Adding proximity sensor code to in-call UI.
Many of these changes are verbatim code copies from what used to exist
in services/Telephony. The rest of them are straight logic copies that
should do the exact same things.
New class ProximitySensor manages the proximity behavior. It receives
device state from InCallPresenter, AudioModeProvider, CallButtonPresenter,
and AcceleromterListener, the last of which is a transplanted class from
services/Telephony.
ProximitySensor listens for the following events:
1. Change in the call state
2. Change in the audio mode
3. Change in the device orientation (from AccelerometerListener)
4. Change in the dialpad visibility
5. Change in hard keyboard open/close events.
6. Change in foreground position of InCall UI app.
It uses these to figure out when to enable/disable proximity sensor.
CL that removes code from TeleService: I77e0d15ad1a8f5a090c1368db98edaa246dbcd72
bug: 10366512
Change-Id: I5c2ea6daa9443e7ad77c67f272bc0bafdb060e5e
diff --git a/InCallUI/AndroidManifest.xml b/InCallUI/AndroidManifest.xml
index 3196dba..42d8e31 100644
--- a/InCallUI/AndroidManifest.xml
+++ b/InCallUI/AndroidManifest.xml
@@ -23,6 +23,7 @@
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.WAKE_LOCK"/>
<application
android:name="InCallApp"