replace BluetoothSwap with BluetoothManager, using HandlerThread

This is the last of the SwapType stuff!

fdroid/fdroidclient#1723
fdroid/fdroidclient#1669
This commit is contained in:
Hans-Christoph Steiner
2019-05-22 16:21:54 +02:00
parent ddbe93aeb4
commit fea778793c
12 changed files with 319 additions and 405 deletions

View File

@@ -47,7 +47,7 @@ public class BluetoothConnection {
Utils.closeQuietly(socket);
}
public void close() throws IOException {
public void close() {
closeQuietly();
}
}

View File

@@ -25,7 +25,6 @@ import android.annotation.TargetApi;
import android.app.Activity;
import android.app.PendingIntent;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@@ -702,7 +701,7 @@ public class AppDetailsActivity extends AppCompatActivity
if (Build.VERSION.SDK_INT < 18) {
return BluetoothAdapter.getDefaultAdapter();
}
return ((BluetoothManager) getSystemService(BLUETOOTH_SERVICE)).getAdapter();
return ((android.bluetooth.BluetoothManager) getSystemService(BLUETOOTH_SERVICE)).getAdapter();
}
@Override