mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Merge branch '1655-no-bluetooth-activity' into 'master'
Check if REQUEST_BLUETOOTH_DISCOVERABLE is available before launching Closes #1655 See merge request briar/briar!1189
This commit is contained in:
@@ -183,10 +183,14 @@ public abstract class KeyAgreementActivity extends BriarActivity implements
|
||||
if (bt == null) {
|
||||
setBluetoothState(BluetoothState.NO_ADAPTER);
|
||||
} else {
|
||||
setBluetoothState(BluetoothState.WAITING);
|
||||
wasAdapterEnabled = bt.isEnabled();
|
||||
Intent i = new Intent(ACTION_REQUEST_DISCOVERABLE);
|
||||
startActivityForResult(i, REQUEST_BLUETOOTH_DISCOVERABLE);
|
||||
if (i.resolveActivity(getPackageManager()) != null) {
|
||||
setBluetoothState(BluetoothState.WAITING);
|
||||
wasAdapterEnabled = bt.isEnabled();
|
||||
startActivityForResult(i, REQUEST_BLUETOOTH_DISCOVERABLE);
|
||||
} else {
|
||||
setBluetoothState(BluetoothState.NO_ADAPTER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user