From 14ef1e441765e6746237fc196d57fed7bb6efcd9 Mon Sep 17 00:00:00 2001 From: Marie Janssen Date: Fri, 10 Mar 2017 09:28:06 -0800 Subject: [PATCH] Bluetooth: leave screen off for permission request Test: pair to a carkit, disable pbap, reconnect from carkit Bug: 32555940 Change-Id: I06d6cc0873f9f991e68f1de9b629dbe3a7bb7701 --- .../settings/bluetooth/BluetoothPermissionRequest.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java index fc6b876a7fa..e909afdeb47 100644 --- a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java +++ b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java @@ -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