From fd03ebd764576f16f2f71b91af70fd8240d947d1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 26 Feb 2016 22:22:10 +0100 Subject: [PATCH] annotate swap methods that require android-10 swap only works on >= android-10 anyway closes #581 https://gitlab.com/fdroid/fdroidclient/issues/581 --- .../src/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java | 2 ++ .../src/org/fdroid/fdroid/net/bluetooth/BluetoothServer.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java b/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java index 44ec1a0d3..ccb907c8d 100644 --- a/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java +++ b/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java @@ -1,5 +1,6 @@ package org.fdroid.fdroid.net.bluetooth; +import android.annotation.TargetApi; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; @@ -21,6 +22,7 @@ public class BluetoothClient { device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(macAddress); } + @TargetApi(10) public BluetoothConnection openConnection() throws IOException { BluetoothSocket socket = null; diff --git a/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothServer.java b/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothServer.java index 3c39917f9..848192731 100644 --- a/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothServer.java +++ b/F-Droid/src/org/fdroid/fdroid/net/bluetooth/BluetoothServer.java @@ -1,5 +1,6 @@ package org.fdroid.fdroid.net.bluetooth; +import android.annotation.TargetApi; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothServerSocket; import android.bluetooth.BluetoothSocket; @@ -61,6 +62,7 @@ public class BluetoothServer extends Thread { } } + @TargetApi(10) @Override public void run() {