Cleanup after bluetooth-swap merge
This commit is contained in:
parent
42d31eb0e6
commit
cba2e67a70
@ -282,7 +282,7 @@ public class RepoUpdater {
|
||||
* actually in the index.jar itself. If no fingerprint, just store the
|
||||
* signing certificate */
|
||||
boolean trustNewSigningCertificate = false;
|
||||
if (repo.fingerprint == null || TextUtils.isEmpty(repo.fingerprint)) {
|
||||
if (TextUtils.isEmpty(repo.fingerprint)) {
|
||||
// no info to check things are valid, so just Trust On First Use
|
||||
trustNewSigningCertificate = true;
|
||||
} else {
|
||||
|
@ -108,17 +108,13 @@ public class SwapService extends Service {
|
||||
|
||||
public void scanForPeers() {
|
||||
Log.d(TAG, "Scanning for nearby devices to swap with...");
|
||||
|
||||
bonjourFinder.scan();
|
||||
bluetoothFinder.scan();
|
||||
|
||||
}
|
||||
|
||||
public void stopScanningForPeers() {
|
||||
|
||||
bonjourFinder.cancel();
|
||||
bluetoothFinder.cancel();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -579,7 +575,7 @@ public class SwapService extends Service {
|
||||
|
||||
public void disableAllSwapping() {
|
||||
Log.i(TAG, "Asked to stop swapping, will stop bluetooth, wifi, and move service to BG for GC.");
|
||||
// getBluetoothSwap().stopInBackground();
|
||||
//getBluetoothSwap().stopInBackground();
|
||||
getWifiSwap().stopInBackground();
|
||||
|
||||
// Ensure the user is sent back go the first screen when returning if we have just forceably
|
||||
|
@ -96,16 +96,12 @@ public class BluetoothFinder extends PeerFinder<BluetoothPeer> {
|
||||
|
||||
private void onDeviceFound(BluetoothDevice device) {
|
||||
|
||||
if(device != null && device.getName() != null &&
|
||||
if (device != null && device.getName() != null &&
|
||||
(device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.COMPUTER_HANDHELD_PC_PDA||
|
||||
device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.COMPUTER_PALM_SIZE_PC_PDA||
|
||||
device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.PHONE_SMART))
|
||||
{
|
||||
device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.PHONE_SMART)) {
|
||||
foundPeer(new BluetoothPeer(device));
|
||||
}
|
||||
// if (device != null && device.getName() != null && device.getName().startsWith(BluetoothSwap.BLUETOOTH_NAME_TAG)) {
|
||||
// foundPeer(new BluetoothPeer(device));
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -135,10 +135,12 @@ public class BluetoothSwap extends SwapType {
|
||||
server.close();
|
||||
setConnected(false);
|
||||
|
||||
// if (receiver != null) {
|
||||
// context.unregisterReceiver(receiver);
|
||||
// receiver = null;
|
||||
// }
|
||||
/*
|
||||
if (receiver != null) {
|
||||
context.unregisterReceiver(receiver);
|
||||
receiver = null;
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
Log.i(TAG, "Attempting to stop Bluetooth swap, but it is not currently running.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user