move ".net.bluetooth" into ".nearby" package
This commit is contained in:
parent
15d349f863
commit
32aad6b562
@ -17,7 +17,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package org.fdroid.fdroid.net.bluetooth;
|
||||
package org.fdroid.fdroid.nearby;
|
||||
|
||||
/**
|
||||
* Dummy version for basic app flavor.
|
@ -1,4 +1,4 @@
|
||||
package org.fdroid.fdroid.net.bluetooth;
|
||||
package org.fdroid.fdroid.nearby;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
@ -16,7 +16,6 @@ import android.util.Log;
|
||||
import org.fdroid.fdroid.R;
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.fdroid.fdroid.nearby.peers.BluetoothPeer;
|
||||
import org.fdroid.fdroid.net.bluetooth.BluetoothServer;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.fdroid.fdroid.net.bluetooth;
|
||||
package org.fdroid.fdroid.nearby;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothServerSocket;
|
||||
@ -7,8 +7,8 @@ import android.util.Log;
|
||||
import android.webkit.MimeTypeMap;
|
||||
import fi.iki.elonen.NanoHTTPD;
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.fdroid.fdroid.net.bluetooth.httpish.Request;
|
||||
import org.fdroid.fdroid.net.bluetooth.httpish.Response;
|
||||
import org.fdroid.fdroid.nearby.httpish.Request;
|
||||
import org.fdroid.fdroid.nearby.httpish.Response;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
@ -1,4 +1,4 @@
|
||||
package org.fdroid.fdroid.net.bluetooth;
|
||||
package org.fdroid.fdroid.nearby;
|
||||
|
||||
import android.bluetooth.BluetoothSocket;
|
||||
import org.fdroid.fdroid.Utils;
|
@ -1,4 +1,4 @@
|
||||
package org.fdroid.fdroid.net.bluetooth;
|
||||
package org.fdroid.fdroid.nearby;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -1,6 +1,4 @@
|
||||
package org.fdroid.fdroid.net.bluetooth.httpish.headers;
|
||||
|
||||
import org.fdroid.fdroid.net.bluetooth.FileDetails;
|
||||
package org.fdroid.fdroid.nearby.httpish;
|
||||
|
||||
public class ContentLengthHeader extends Header {
|
||||
|
@ -1,6 +1,4 @@
|
||||
package org.fdroid.fdroid.net.bluetooth.httpish.headers;
|
||||
|
||||
import org.fdroid.fdroid.net.bluetooth.FileDetails;
|
||||
package org.fdroid.fdroid.nearby.httpish;
|
||||
|
||||
public class ETagHeader extends Header {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.fdroid.fdroid.net.bluetooth;
|
||||
package org.fdroid.fdroid.nearby.httpish;
|
||||
|
||||
public class FileDetails {
|
||||
|
||||
@ -13,11 +13,11 @@ public class FileDetails {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileSize(int fileSize) {
|
||||
void setFileSize(int fileSize) {
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public void setCacheTag(String cacheTag) {
|
||||
void setCacheTag(String cacheTag) {
|
||||
this.cacheTag = cacheTag;
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
package org.fdroid.fdroid.net.bluetooth.httpish.headers;
|
||||
|
||||
import org.fdroid.fdroid.net.bluetooth.FileDetails;
|
||||
package org.fdroid.fdroid.nearby.httpish;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public abstract class Header {
|
||||
|
||||
private static final Header[] VALID_HEADERS = {
|
||||
new ContentLengthHeader(),
|
||||
new ETagHeader(),
|
||||
new ContentLengthHeader(),
|
||||
new ETagHeader(),
|
||||
};
|
||||
|
||||
protected abstract String getName();
|
@ -1,7 +1,7 @@
|
||||
package org.fdroid.fdroid.net.bluetooth.httpish;
|
||||
package org.fdroid.fdroid.nearby.httpish;
|
||||
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.fdroid.fdroid.net.bluetooth.BluetoothConnection;
|
||||
import org.fdroid.fdroid.nearby.BluetoothConnection;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
@ -1,10 +1,8 @@
|
||||
package org.fdroid.fdroid.net.bluetooth.httpish;
|
||||
package org.fdroid.fdroid.nearby.httpish;
|
||||
|
||||
import android.util.Log;
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.fdroid.fdroid.net.bluetooth.BluetoothConnection;
|
||||
import org.fdroid.fdroid.net.bluetooth.FileDetails;
|
||||
import org.fdroid.fdroid.net.bluetooth.httpish.headers.Header;
|
||||
import org.fdroid.fdroid.nearby.BluetoothConnection;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
@ -87,7 +85,7 @@ public class Response {
|
||||
|
||||
/**
|
||||
* Extracts meaningful headers from the response into a more useful and safe
|
||||
* {@link org.fdroid.fdroid.net.bluetooth.FileDetails} object.
|
||||
* {@link FileDetails} object.
|
||||
*/
|
||||
public FileDetails toFileDetails() {
|
||||
FileDetails details = new FileDetails();
|
@ -5,11 +5,11 @@ import android.support.annotation.Nullable;
|
||||
import android.util.Log;
|
||||
import org.apache.commons.io.input.BoundedInputStream;
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.fdroid.fdroid.net.bluetooth.BluetoothClient;
|
||||
import org.fdroid.fdroid.net.bluetooth.BluetoothConnection;
|
||||
import org.fdroid.fdroid.net.bluetooth.FileDetails;
|
||||
import org.fdroid.fdroid.net.bluetooth.httpish.Request;
|
||||
import org.fdroid.fdroid.net.bluetooth.httpish.Response;
|
||||
import org.fdroid.fdroid.nearby.BluetoothClient;
|
||||
import org.fdroid.fdroid.nearby.BluetoothConnection;
|
||||
import org.fdroid.fdroid.nearby.httpish.FileDetails;
|
||||
import org.fdroid.fdroid.nearby.httpish.Request;
|
||||
import org.fdroid.fdroid.nearby.httpish.Response;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
Loading…
x
Reference in New Issue
Block a user