diff options
author | Santos Cordon <santoscordon@google.com> | 2013-08-27 21:01:41 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2013-08-27 23:27:52 -0700 |
commit | c47616fe0aa03922d4ccb95cb7ae253e06da7a96 (patch) | |
tree | c7debf5851b588b4624aee1264d3457a7b1ecd2c /InCallUI | |
parent | e9e6f43ab11b303e3604b8807cd10272a15ed3b3 (diff) |
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
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/ProximitySensor.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/ProximitySensor.java b/InCallUI/src/com/android/incallui/ProximitySensor.java index fb8e468ac..0012e8a0f 100644 --- a/InCallUI/src/com/android/incallui/ProximitySensor.java +++ b/InCallUI/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()) { |