Use alternative prox sensor when specified.
This is a manual upstream merge of http://ag/10320285 from Q to R.
It does not merge cleanly since the usage of prox sensors has been
consolidated in R.
With this change, devices are able to specify an alternative proximity
sensor via R.string.proximity_sensor_type, along with a threshold
value below which the proximity sensor is considered "near".
Prior to this, the R.string.doze_brightness_sensor_type value was
serving double duty for this purpose, but, for at least some devices,
we want to have a different brightness sensor vs proximity sensor.
Bug: 149420648
Test: manual
Change-Id: Ifd2006cce1c7a653fd67a7a33b63c5f638384bab
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 8de2df5..055676f 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -201,6 +201,13 @@
always-on display) -->
<string name="doze_brightness_sensor_type" translatable="false"></string>
+ <!-- Override value to use for proximity sensor. -->
+ <string name="proximity_sensor_type" translatable="false"></string>
+
+ <!-- If using proximity_sensor_type, specifies a threshold value to distinguish near and
+ far break points. A sensor value less than this is considered "near". -->
+ <item name="proximity_sensor_threshold" translatable="false" format="float" type="dimen"></item>
+
<!-- Doze: pulse parameter - how long does it take to fade in? -->
<integer name="doze_pulse_duration_in">130</integer>