fd1b98ba83b1ef9b94329f32f0eacf7ddb31cf8b |
|
24-Aug-2011 |
Flavio Lerda <flerda@google.com> |
Blank the screen while playing voicemail using proximity sensor. This commit blanks the screen when the proximity sensor tells us that there is an object close to the screen. This is to avoid accidental touching of UI element with your face while listening to voicemail. As a consequence, do not enable this if listening to voicemail using the speaker phone, because in that case we do not need to blank the screen at all as the user is unlikely to have the phone near their ear. This is done using a blank view that is placed on top of all other views and by hiding the action bar. This leave the notification area available to be accidentally touched, but we cannot hide the notification area without starting a new activity. Moreover, we do not want to start a new activity as that would cause our activity to be stopped, which we do not want to do while the user is listening to voicemail, as we plan to stop playback when the activity is paused. Bug: 5188914 Change-Id: I17bfa7b9d466db7519a97e7ca96f152bde64b78d
/packages/apps/Contacts/src/com/android/contacts/ProximitySensorManager.java
|