add discoverability timoeut when set by 3rd party app
Change-Id: Ibfd358121f8f9fbbf3b9bc06c5be7b9300e0ba53
This commit is contained in:
committed by
Matthew Xie
parent
0134761426
commit
4bb010a67f
@@ -228,8 +228,12 @@ public class RequestPermissionActivity extends Activity implements
|
||||
} else if (mLocalAdapter.setScanMode(
|
||||
BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE, mTimeout)) {
|
||||
// If already in discoverable mode, this will extend the timeout.
|
||||
long endTime = System.currentTimeMillis() + (long) mTimeout * 1000;
|
||||
LocalBluetoothPreferences.persistDiscoverableEndTimestamp(
|
||||
this, System.currentTimeMillis() + (long) mTimeout * 1000);
|
||||
this, endTime);
|
||||
if (0 < mTimeout) {
|
||||
BluetoothDiscoverableTimeoutReceiver.setDiscoverableAlarm(this, endTime);
|
||||
}
|
||||
returnCode = mTimeout;
|
||||
// Activity.RESULT_FIRST_USER should be 1
|
||||
if (returnCode < RESULT_FIRST_USER) {
|
||||
|
Reference in New Issue
Block a user