Merge "Bluetooth: leave screen off for permission request" am: 172b01035d am: 09f5638b92

am: 895ac35f4d

Change-Id: I9e162f37b76ad8e7adc438d082d8352720916df0
This commit is contained in:
Marie Janssen
2017-03-15 23:02:23 +00:00
committed by android-build-merger

View File

@@ -118,13 +118,6 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
context, deviceAddress, deviceName)) {
context.startActivity(connectionAccessIntent);
} else {
// Acquire wakelock so that LCD comes up since screen is off
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK |
PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE,
"ConnectionAccessActivity");
wakeLock.setReferenceCounted(false);
wakeLock.acquire();
// Put up a notification that leads to the dialog
// Create an intent triggered by clicking on the
@@ -181,7 +174,6 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
notificationManager.notify(getNotificationTag(mRequestType), NOTIFICATION_ID,
notification);
wakeLock.release();
}
} else if (action.equals(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL)) {
// Remove the notification