annotate swap methods that require android-10
swap only works on >= android-10 anyway closes #581 https://gitlab.com/fdroid/fdroidclient/issues/581
This commit is contained in:
parent
26b35723d3
commit
fd03ebd764
@ -1,5 +1,6 @@
|
|||||||
package org.fdroid.fdroid.net.bluetooth;
|
package org.fdroid.fdroid.net.bluetooth;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
import android.bluetooth.BluetoothSocket;
|
import android.bluetooth.BluetoothSocket;
|
||||||
@ -21,6 +22,7 @@ public class BluetoothClient {
|
|||||||
device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(macAddress);
|
device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(macAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(10)
|
||||||
public BluetoothConnection openConnection() throws IOException {
|
public BluetoothConnection openConnection() throws IOException {
|
||||||
|
|
||||||
BluetoothSocket socket = null;
|
BluetoothSocket socket = null;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.fdroid.fdroid.net.bluetooth;
|
package org.fdroid.fdroid.net.bluetooth;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.bluetooth.BluetoothServerSocket;
|
import android.bluetooth.BluetoothServerSocket;
|
||||||
import android.bluetooth.BluetoothSocket;
|
import android.bluetooth.BluetoothSocket;
|
||||||
@ -61,6 +62,7 @@ public class BluetoothServer extends Thread {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(10)
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user