summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/bluetooth/BluetoothPermissionRequest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
index 372f9a5da..074e0bd0f 100644
--- a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
+++ b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
@@ -117,6 +117,13 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
context, deviceAddress)) {
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
@@ -173,6 +180,7 @@ 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