From 21e39a2e0c15d74f148f244c64ca484ac8c08db1 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Fri, 3 Jun 2016 16:27:49 +0100 Subject: [PATCH] Make lid switch edge rather than level triggered. Right now, because of the way that configurations are applied, when the display turns on because of an incoming phone call the fact that the lid is "shut" will automatically put the phone back to sleep, causing the ringer to be silenced. By making this edge triggered, the display will only sleep or wake up when the lid is initially shut or opened, respectively, avoiding this issue. In the future we may want to revise this so that the lid-shut state is better understood throughout the system to avoid these types of issues, but for now this is sufficient. Bug: 26600446 Change-Id: I10d403b62944ed6eceaff58cddad5c243a2884df --- .../core/java/com/android/server/policy/PhoneWindowManager.java | 1 - 1 file changed, 1 deletion(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 66bb24d02de48..c9c27a2a6c97d 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -2262,7 +2262,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { readConfigurationDependentBehaviors(); readLidState(); - applyLidSwitchState(); if (config.keyboard == Configuration.KEYBOARD_NOKEYS || (keyboardPresence == PRESENCE_INTERNAL