Loading services/core/java/com/android/server/display/DisplayPowerController.java +21 −4 Original line number Diff line number Diff line Loading @@ -129,7 +129,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private static final int MSG_STOP = 9; private static final int MSG_UPDATE_BRIGHTNESS = 10; private static final int MSG_UPDATE_RBC = 11; private static final int MSG_STATSD_HBM_BRIGHTNESS = 12; private static final int MSG_BRIGHTNESS_RAMP_DONE = 12; private static final int MSG_STATSD_HBM_BRIGHTNESS = 13; private static final int PROXIMITY_UNKNOWN = -1; private static final int PROXIMITY_NEGATIVE = 0; Loading Loading @@ -1050,9 +1051,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call @Override public void onAnimationEnd() { sendUpdatePowerState(); final float brightness = mPowerState.getScreenBrightness(); reportStats(brightness); Message msg = mHandler.obtainMessage(MSG_BRIGHTNESS_RAMP_DONE); mHandler.sendMessage(msg); } }; Loading @@ -1066,6 +1066,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call mCallbacks.releaseSuspendBlocker(); mUnfinishedBusiness = false; } final float brightness = mPowerState != null ? mPowerState.getScreenBrightness() : PowerManager.BRIGHTNESS_MIN; reportStats(brightness); if (mPowerState != null) { mPowerState.stop(); mPowerState = null; Loading Loading @@ -2580,6 +2586,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } private void reportStats(float brightness) { if (mLastStatsBrightness == brightness) { return; } float hbmTransitionPoint = PowerManager.BRIGHTNESS_MAX; synchronized(mCachedBrightnessInfo) { if (mCachedBrightnessInfo.hbmTransitionPoint == null) { Loading Loading @@ -2680,6 +2690,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call handleRbcChanged(strengthChanged == 1, justActivated == 1); break; case MSG_BRIGHTNESS_RAMP_DONE: if (mPowerState != null) { final float brightness = mPowerState.getScreenBrightness(); reportStats(brightness); } break; case MSG_STATSD_HBM_BRIGHTNESS: logHbmBrightnessStats(Float.intBitsToFloat(msg.arg1), msg.arg2); break; Loading Loading
services/core/java/com/android/server/display/DisplayPowerController.java +21 −4 Original line number Diff line number Diff line Loading @@ -129,7 +129,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private static final int MSG_STOP = 9; private static final int MSG_UPDATE_BRIGHTNESS = 10; private static final int MSG_UPDATE_RBC = 11; private static final int MSG_STATSD_HBM_BRIGHTNESS = 12; private static final int MSG_BRIGHTNESS_RAMP_DONE = 12; private static final int MSG_STATSD_HBM_BRIGHTNESS = 13; private static final int PROXIMITY_UNKNOWN = -1; private static final int PROXIMITY_NEGATIVE = 0; Loading Loading @@ -1050,9 +1051,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call @Override public void onAnimationEnd() { sendUpdatePowerState(); final float brightness = mPowerState.getScreenBrightness(); reportStats(brightness); Message msg = mHandler.obtainMessage(MSG_BRIGHTNESS_RAMP_DONE); mHandler.sendMessage(msg); } }; Loading @@ -1066,6 +1066,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call mCallbacks.releaseSuspendBlocker(); mUnfinishedBusiness = false; } final float brightness = mPowerState != null ? mPowerState.getScreenBrightness() : PowerManager.BRIGHTNESS_MIN; reportStats(brightness); if (mPowerState != null) { mPowerState.stop(); mPowerState = null; Loading Loading @@ -2580,6 +2586,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } private void reportStats(float brightness) { if (mLastStatsBrightness == brightness) { return; } float hbmTransitionPoint = PowerManager.BRIGHTNESS_MAX; synchronized(mCachedBrightnessInfo) { if (mCachedBrightnessInfo.hbmTransitionPoint == null) { Loading Loading @@ -2680,6 +2690,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call handleRbcChanged(strengthChanged == 1, justActivated == 1); break; case MSG_BRIGHTNESS_RAMP_DONE: if (mPowerState != null) { final float brightness = mPowerState.getScreenBrightness(); reportStats(brightness); } break; case MSG_STATSD_HBM_BRIGHTNESS: logHbmBrightnessStats(Float.intBitsToFloat(msg.arg1), msg.arg2); break; Loading