summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-08-27 21:01:41 -0700
committerSantos Cordon <santoscordon@google.com>2013-08-27 23:27:52 -0700
commitc8452ca1ed9c5bb79bb0cc7419bd8b791550bf69 (patch)
tree7dd1fea5c15d41ec009da516145c590b0e582fe6
parent9220204f987116db9629ceb0410ae86758ebe07e (diff)
downloadpackages_apps_InCallUI-c8452ca1ed9c5bb79bb0cc7419bd8b791550bf69.tar.gz
packages_apps_InCallUI-c8452ca1ed9c5bb79bb0cc7419bd8b791550bf69.tar.bz2
packages_apps_InCallUI-c8452ca1ed9c5bb79bb0cc7419bd8b791550bf69.zip
Add logging to proximity sensor.
prox sensor bugs often come randomly and it's good to have logs in place. bug:10516724 Change-Id: I453f2a6904fec48f2a4e6acac13da111c60b2e2a
-rw-r--r--src/com/android/incallui/ProximitySensor.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/incallui/ProximitySensor.java b/src/com/android/incallui/ProximitySensor.java
index fb8e468a..0012e8a0 100644
--- a/src/com/android/incallui/ProximitySensor.java
+++ b/src/com/android/incallui/ProximitySensor.java
@@ -165,17 +165,17 @@ public class ProximitySensor implements AccelerometerListener.OrientationListene
* 4) If the slider is open(i.e. the hardkeyboard is *not* hidden)
*/
private void updateProximitySensorMode() {
- Log.v(this, "updateProximitySensorMode");
+ Log.i(this, "updateProximitySensorMode");
if (proximitySensorModeEnabled()) {
- Log.v(this, "keyboard open: ", mIsHardKeyboardOpen);
- Log.v(this, "dialpad visible: ", mDialpadVisible);
+ Log.i(this, "keyboard open: " + mIsHardKeyboardOpen);
+ Log.i(this, "dialpad visible: " + mDialpadVisible);
Log.v(this, "isOffhook: ", mIsPhoneOffhook);
synchronized (mProximityWakeLock) {
final int audioMode = mAudioModeProvider.getAudioMode();
- Log.v(this, "audioMode: ", AudioMode.toString(audioMode));
+ Log.i(this, "audioMode: " + AudioMode.toString(audioMode));
// turn proximity sensor off and turn screen on immediately if
// we are using a headset, the keyboard is open, or the device
@@ -190,7 +190,7 @@ public class ProximitySensor implements AccelerometerListener.OrientationListene
// proximity sensor goes negative.
final boolean horizontal =
(mOrientation == AccelerometerListener.ORIENTATION_HORIZONTAL);
- Log.v(this, "horizontal: ", horizontal);
+ Log.i(this, "horizontal: " + horizontal);
screenOnImmediately |= !mUiShowing && horizontal;
// We do not keep the screen off when dialpad is visible, we are horizontal, and
@@ -202,6 +202,7 @@ public class ProximitySensor implements AccelerometerListener.OrientationListene
Log.v(this, "screenonImmediately: ", screenOnImmediately);
if (mIsPhoneOffhook && !screenOnImmediately) {
+ Log.i(this, "turning on proximity sensor");
// Phone is in use! Arrange for the screen to turn off
// automatically when the sensor detects a close object.
if (!mProximityWakeLock.isHeld()) {
@@ -211,6 +212,7 @@ public class ProximitySensor implements AccelerometerListener.OrientationListene
Log.v(this, "updateProximitySensorMode: lock already held.");
}
} else {
+ Log.i(this, "turning off proximity sensor");
// Phone is either idle, or ringing. We don't want any
// special proximity sensor behavior in either case.
if (mProximityWakeLock.isHeld()) {