Set config_suspendWhenScreenOffDueToProximity true
This config indicate whether to allow the device to suspend
when the screen is off due to the proximity sensor. This
resource should only be set to true if the sensor HAL correctly
handles the proximity sensor as a wake-up source. Otherwise,
the device may fail to wake out of suspend reliably.
Bug: 192324731
Test: 1. Unplug USB. 2. make a phone call.
Test: 3. Cover p-sensor, the screen turns off for 10 seconds
Test: 4. Uncover p-sensor. 5. Plug USB.
Test: 6. 'adb shell dmesg | grep suspend' to check if AP ever suspend in calls.
Change-Id: I90c0ef56211908b5a211d9f887bbfc6693a3be40
diff --git a/oriole/overlay/frameworks/base/core/res/res/values/config.xml b/oriole/overlay/frameworks/base/core/res/res/values/config.xml
index 38e875c..f0a2ee4 100644
--- a/oriole/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/oriole/overlay/frameworks/base/core/res/res/values/config.xml
@@ -18,6 +18,13 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Indicate whether to allow the device to suspend when the screen is off
+ due to the proximity sensor. This resource should only be set to true
+ if the sensor HAL correctly handles the proximity sensor as a wake-up source.
+ Otherwise, the device may fail to wake out of suspend reliably.
+ The default is false. -->
+ <bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
+
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>
diff --git a/raven/overlay/frameworks/base/core/res/res/values/config.xml b/raven/overlay/frameworks/base/core/res/res/values/config.xml
index aec5d38..06da015 100644
--- a/raven/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/raven/overlay/frameworks/base/core/res/res/values/config.xml
@@ -54,6 +54,13 @@
<!-- Type of the quick pickup sensor. Empty if quick pickup is not supported. -->
<string name="config_quickPickupSensorType" translatable="false">com.google.sensor.quick_pickup</string>
+ <!-- Indicate whether to allow the device to suspend when the screen is off
+ due to the proximity sensor. This resource should only be set to true
+ if the sensor HAL correctly handles the proximity sensor as a wake-up source.
+ Otherwise, the device may fail to wake out of suspend reliably.
+ The default is false. -->
+ <bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
+
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>