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
|
* actually in the index.jar itself. If no fingerprint, just store the
|
||||||
* signing certificate */
|
* signing certificate */
|
||||||
boolean trustNewSigningCertificate = false;
|
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
|
// no info to check things are valid, so just Trust On First Use
|
||||||
trustNewSigningCertificate = true;
|
trustNewSigningCertificate = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -108,17 +108,13 @@ public class SwapService extends Service {
|
|||||||
|
|
||||||
public void scanForPeers() {
|
public void scanForPeers() {
|
||||||
Log.d(TAG, "Scanning for nearby devices to swap with...");
|
Log.d(TAG, "Scanning for nearby devices to swap with...");
|
||||||
|
|
||||||
bonjourFinder.scan();
|
bonjourFinder.scan();
|
||||||
bluetoothFinder.scan();
|
bluetoothFinder.scan();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopScanningForPeers() {
|
public void stopScanningForPeers() {
|
||||||
|
|
||||||
bonjourFinder.cancel();
|
bonjourFinder.cancel();
|
||||||
bluetoothFinder.cancel();
|
bluetoothFinder.cancel();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -579,7 +575,7 @@ public class SwapService extends Service {
|
|||||||
|
|
||||||
public void disableAllSwapping() {
|
public void disableAllSwapping() {
|
||||||
Log.i(TAG, "Asked to stop swapping, will stop bluetooth, wifi, and move service to BG for GC.");
|
Log.i(TAG, "Asked to stop swapping, will stop bluetooth, wifi, and move service to BG for GC.");
|
||||||
// getBluetoothSwap().stopInBackground();
|
//getBluetoothSwap().stopInBackground();
|
||||||
getWifiSwap().stopInBackground();
|
getWifiSwap().stopInBackground();
|
||||||
|
|
||||||
// Ensure the user is sent back go the first screen when returning if we have just forceably
|
// 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) {
|
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_HANDHELD_PC_PDA||
|
||||||
device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.COMPUTER_PALM_SIZE_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));
|
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();
|
server.close();
|
||||||
setConnected(false);
|
setConnected(false);
|
||||||
|
|
||||||
// if (receiver != null) {
|
/*
|
||||||
// context.unregisterReceiver(receiver);
|
if (receiver != null) {
|
||||||
// receiver = null;
|
context.unregisterReceiver(receiver);
|
||||||
// }
|
receiver = null;
|
||||||
|
}
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "Attempting to stop Bluetooth swap, but it is not currently running.");
|
Log.i(TAG, "Attempting to stop Bluetooth swap, but it is not currently running.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user