Loading services/core/java/com/android/server/display/BrightnessTracker.java +8 −8 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ public class BrightnessTracker { * Notify the BrightnessTracker that the user has changed the brightness of the display. */ public void notifyBrightnessChanged(float brightness, boolean userInitiated, float powerBrightnessFactor, boolean isUserSetBrightness, float powerBrightnessFactor, boolean wasShortTermModelActive, boolean isDefaultBrightnessConfig, String uniqueDisplayId, float[] luxValues, long[] luxTimestamps) { if (DEBUG) { Loading @@ -328,7 +328,7 @@ public class BrightnessTracker { } Message m = mBgHandler.obtainMessage(MSG_BRIGHTNESS_CHANGED, userInitiated ? 1 : 0, 0 /*unused*/, new BrightnessChangeValues(brightness, powerBrightnessFactor, isUserSetBrightness, isDefaultBrightnessConfig, powerBrightnessFactor, wasShortTermModelActive, isDefaultBrightnessConfig, mInjector.currentTimeMillis(), uniqueDisplayId, luxValues, luxTimestamps)); m.sendToTarget(); } Loading @@ -342,7 +342,7 @@ public class BrightnessTracker { } private void handleBrightnessChanged(float brightness, boolean userInitiated, float powerBrightnessFactor, boolean isUserSetBrightness, float powerBrightnessFactor, boolean wasShortTermModelActive, boolean isDefaultBrightnessConfig, long timestamp, String uniqueDisplayId, float[] luxValues, long[] luxTimestamps) { BrightnessChangeEvent.Builder builder; Loading @@ -367,7 +367,7 @@ public class BrightnessTracker { builder.setBrightness(brightness); builder.setTimeStamp(timestamp); builder.setPowerBrightnessFactor(powerBrightnessFactor); builder.setUserBrightnessPoint(isUserSetBrightness); builder.setUserBrightnessPoint(wasShortTermModelActive); builder.setIsDefaultBrightnessConfig(isDefaultBrightnessConfig); builder.setUniqueDisplayId(uniqueDisplayId); Loading Loading @@ -995,7 +995,7 @@ public class BrightnessTracker { BrightnessChangeValues values = (BrightnessChangeValues) msg.obj; boolean userInitiatedChange = (msg.arg1 == 1); handleBrightnessChanged(values.brightness, userInitiatedChange, values.powerBrightnessFactor, values.isUserSetBrightness, values.powerBrightnessFactor, values.wasShortTermModelActive, values.isDefaultBrightnessConfig, values.timestamp, values.uniqueDisplayId, values.luxValues, values.luxTimestamps); break; Loading Loading @@ -1026,7 +1026,7 @@ public class BrightnessTracker { private static class BrightnessChangeValues { public final float brightness; public final float powerBrightnessFactor; public final boolean isUserSetBrightness; public final boolean wasShortTermModelActive; public final boolean isDefaultBrightnessConfig; public final long timestamp; public final String uniqueDisplayId; Loading @@ -1034,11 +1034,11 @@ public class BrightnessTracker { public final long[] luxTimestamps; BrightnessChangeValues(float brightness, float powerBrightnessFactor, boolean isUserSetBrightness, boolean isDefaultBrightnessConfig, boolean wasShortTermModelActive, boolean isDefaultBrightnessConfig, long timestamp, String uniqueDisplayId, float[] luxValues, long[] luxTimestamps) { this.brightness = brightness; this.powerBrightnessFactor = powerBrightnessFactor; this.isUserSetBrightness = isUserSetBrightness; this.wasShortTermModelActive = wasShortTermModelActive; this.isDefaultBrightnessConfig = isDefaultBrightnessConfig; this.timestamp = timestamp; this.uniqueDisplayId = uniqueDisplayId; Loading services/core/java/com/android/server/display/DisplayPowerController.java +6 −6 Original line number Diff line number Diff line Loading @@ -1538,10 +1538,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call // user, or is a temporary adjustment. boolean userInitiatedChange = (Float.isNaN(brightnessState)) && (autoBrightnessAdjustmentChanged || userSetBrightnessChanged); boolean hadUserBrightnessPoint = false; boolean wasShortTermModelActive = false; // Configure auto-brightness. if (mAutomaticBrightnessController != null) { hadUserBrightnessPoint = mAutomaticBrightnessController.hasUserDataPoints(); wasShortTermModelActive = mAutomaticBrightnessController.hasUserDataPoints(); mAutomaticBrightnessController.configure(autoBrightnessState, mBrightnessConfiguration, mLastUserSetScreenBrightness, Loading Loading @@ -1824,7 +1824,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call userInitiatedChange = false; } notifyBrightnessTrackerChanged(brightnessState, userInitiatedChange, hadUserBrightnessPoint); wasShortTermModelActive); } // We save the brightness info *after* the brightness setting has been changed and Loading Loading @@ -1866,7 +1866,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call mTempBrightnessEvent.setRbcStrength(mCdsi != null ? mCdsi.getReduceBrightColorsStrength() : -1); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setWasShortTermModelActive(hadUserBrightnessPoint); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); // Temporary is what we use during slider interactions. We avoid logging those so that // we don't spam logcat when the slider is being used. boolean tempToTempTransition = Loading Loading @@ -2635,7 +2635,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } private void notifyBrightnessTrackerChanged(float brightness, boolean userInitiated, boolean hadUserDataPoint) { boolean wasShortTermModelActive) { final float brightnessInNits = convertToNits(brightness); if (mUseAutoBrightness && brightnessInNits >= 0.0f && mAutomaticBrightnessController != null && mBrightnessTracker != null) { Loading @@ -2646,7 +2646,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call ? mPowerRequest.screenLowPowerBrightnessFactor : 1.0f; mBrightnessTracker.notifyBrightnessChanged(brightnessInNits, userInitiated, powerFactor, hadUserDataPoint, powerFactor, wasShortTermModelActive, mAutomaticBrightnessController.isDefaultConfig(), mUniqueDisplayId, mAutomaticBrightnessController.getLastSensorValues(), mAutomaticBrightnessController.getLastSensorTimestamps()); Loading services/core/java/com/android/server/display/DisplayPowerController2.java +6 −6 Original line number Diff line number Diff line Loading @@ -1250,10 +1250,10 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal // user, or is a temporary adjustment. boolean userInitiatedChange = (Float.isNaN(brightnessState)) && (autoBrightnessAdjustmentChanged || userSetBrightnessChanged); boolean hadUserBrightnessPoint = false; boolean wasShortTermModelActive = false; // Configure auto-brightness. if (mAutomaticBrightnessController != null) { hadUserBrightnessPoint = mAutomaticBrightnessController.hasUserDataPoints(); wasShortTermModelActive = mAutomaticBrightnessController.hasUserDataPoints(); mAutomaticBrightnessController.configure(autoBrightnessState, mBrightnessConfiguration, mDisplayBrightnessController.getLastUserSetScreenBrightness(), Loading Loading @@ -1538,7 +1538,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal userInitiatedChange = false; } notifyBrightnessTrackerChanged(brightnessState, userInitiatedChange, hadUserBrightnessPoint); wasShortTermModelActive); } // We save the brightness info *after* the brightness setting has been changed and Loading Loading @@ -1580,7 +1580,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal mTempBrightnessEvent.setRbcStrength(mCdsi != null ? mCdsi.getReduceBrightColorsStrength() : -1); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setWasShortTermModelActive(hadUserBrightnessPoint); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setDisplayBrightnessStrategyName(displayBrightnessState .getDisplayBrightnessStrategyName()); // Temporary is what we use during slider interactions. We avoid logging those so that Loading Loading @@ -2221,7 +2221,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal } private void notifyBrightnessTrackerChanged(float brightness, boolean userInitiated, boolean hadUserDataPoint) { boolean wasShortTermModelActive) { final float brightnessInNits = convertToNits(brightness); if (mUseAutoBrightness && brightnessInNits >= 0.0f && mAutomaticBrightnessController != null && mBrightnessTracker != null) { Loading @@ -2232,7 +2232,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal ? mPowerRequest.screenLowPowerBrightnessFactor : 1.0f; mBrightnessTracker.notifyBrightnessChanged(brightnessInNits, userInitiated, powerFactor, hadUserDataPoint, powerFactor, wasShortTermModelActive, mAutomaticBrightnessController.isDefaultConfig(), mUniqueDisplayId, mAutomaticBrightnessController.getLastSensorValues(), mAutomaticBrightnessController.getLastSensorTimestamps()); Loading Loading
services/core/java/com/android/server/display/BrightnessTracker.java +8 −8 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ public class BrightnessTracker { * Notify the BrightnessTracker that the user has changed the brightness of the display. */ public void notifyBrightnessChanged(float brightness, boolean userInitiated, float powerBrightnessFactor, boolean isUserSetBrightness, float powerBrightnessFactor, boolean wasShortTermModelActive, boolean isDefaultBrightnessConfig, String uniqueDisplayId, float[] luxValues, long[] luxTimestamps) { if (DEBUG) { Loading @@ -328,7 +328,7 @@ public class BrightnessTracker { } Message m = mBgHandler.obtainMessage(MSG_BRIGHTNESS_CHANGED, userInitiated ? 1 : 0, 0 /*unused*/, new BrightnessChangeValues(brightness, powerBrightnessFactor, isUserSetBrightness, isDefaultBrightnessConfig, powerBrightnessFactor, wasShortTermModelActive, isDefaultBrightnessConfig, mInjector.currentTimeMillis(), uniqueDisplayId, luxValues, luxTimestamps)); m.sendToTarget(); } Loading @@ -342,7 +342,7 @@ public class BrightnessTracker { } private void handleBrightnessChanged(float brightness, boolean userInitiated, float powerBrightnessFactor, boolean isUserSetBrightness, float powerBrightnessFactor, boolean wasShortTermModelActive, boolean isDefaultBrightnessConfig, long timestamp, String uniqueDisplayId, float[] luxValues, long[] luxTimestamps) { BrightnessChangeEvent.Builder builder; Loading @@ -367,7 +367,7 @@ public class BrightnessTracker { builder.setBrightness(brightness); builder.setTimeStamp(timestamp); builder.setPowerBrightnessFactor(powerBrightnessFactor); builder.setUserBrightnessPoint(isUserSetBrightness); builder.setUserBrightnessPoint(wasShortTermModelActive); builder.setIsDefaultBrightnessConfig(isDefaultBrightnessConfig); builder.setUniqueDisplayId(uniqueDisplayId); Loading Loading @@ -995,7 +995,7 @@ public class BrightnessTracker { BrightnessChangeValues values = (BrightnessChangeValues) msg.obj; boolean userInitiatedChange = (msg.arg1 == 1); handleBrightnessChanged(values.brightness, userInitiatedChange, values.powerBrightnessFactor, values.isUserSetBrightness, values.powerBrightnessFactor, values.wasShortTermModelActive, values.isDefaultBrightnessConfig, values.timestamp, values.uniqueDisplayId, values.luxValues, values.luxTimestamps); break; Loading Loading @@ -1026,7 +1026,7 @@ public class BrightnessTracker { private static class BrightnessChangeValues { public final float brightness; public final float powerBrightnessFactor; public final boolean isUserSetBrightness; public final boolean wasShortTermModelActive; public final boolean isDefaultBrightnessConfig; public final long timestamp; public final String uniqueDisplayId; Loading @@ -1034,11 +1034,11 @@ public class BrightnessTracker { public final long[] luxTimestamps; BrightnessChangeValues(float brightness, float powerBrightnessFactor, boolean isUserSetBrightness, boolean isDefaultBrightnessConfig, boolean wasShortTermModelActive, boolean isDefaultBrightnessConfig, long timestamp, String uniqueDisplayId, float[] luxValues, long[] luxTimestamps) { this.brightness = brightness; this.powerBrightnessFactor = powerBrightnessFactor; this.isUserSetBrightness = isUserSetBrightness; this.wasShortTermModelActive = wasShortTermModelActive; this.isDefaultBrightnessConfig = isDefaultBrightnessConfig; this.timestamp = timestamp; this.uniqueDisplayId = uniqueDisplayId; Loading
services/core/java/com/android/server/display/DisplayPowerController.java +6 −6 Original line number Diff line number Diff line Loading @@ -1538,10 +1538,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call // user, or is a temporary adjustment. boolean userInitiatedChange = (Float.isNaN(brightnessState)) && (autoBrightnessAdjustmentChanged || userSetBrightnessChanged); boolean hadUserBrightnessPoint = false; boolean wasShortTermModelActive = false; // Configure auto-brightness. if (mAutomaticBrightnessController != null) { hadUserBrightnessPoint = mAutomaticBrightnessController.hasUserDataPoints(); wasShortTermModelActive = mAutomaticBrightnessController.hasUserDataPoints(); mAutomaticBrightnessController.configure(autoBrightnessState, mBrightnessConfiguration, mLastUserSetScreenBrightness, Loading Loading @@ -1824,7 +1824,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call userInitiatedChange = false; } notifyBrightnessTrackerChanged(brightnessState, userInitiatedChange, hadUserBrightnessPoint); wasShortTermModelActive); } // We save the brightness info *after* the brightness setting has been changed and Loading Loading @@ -1866,7 +1866,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call mTempBrightnessEvent.setRbcStrength(mCdsi != null ? mCdsi.getReduceBrightColorsStrength() : -1); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setWasShortTermModelActive(hadUserBrightnessPoint); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); // Temporary is what we use during slider interactions. We avoid logging those so that // we don't spam logcat when the slider is being used. boolean tempToTempTransition = Loading Loading @@ -2635,7 +2635,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } private void notifyBrightnessTrackerChanged(float brightness, boolean userInitiated, boolean hadUserDataPoint) { boolean wasShortTermModelActive) { final float brightnessInNits = convertToNits(brightness); if (mUseAutoBrightness && brightnessInNits >= 0.0f && mAutomaticBrightnessController != null && mBrightnessTracker != null) { Loading @@ -2646,7 +2646,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call ? mPowerRequest.screenLowPowerBrightnessFactor : 1.0f; mBrightnessTracker.notifyBrightnessChanged(brightnessInNits, userInitiated, powerFactor, hadUserDataPoint, powerFactor, wasShortTermModelActive, mAutomaticBrightnessController.isDefaultConfig(), mUniqueDisplayId, mAutomaticBrightnessController.getLastSensorValues(), mAutomaticBrightnessController.getLastSensorTimestamps()); Loading
services/core/java/com/android/server/display/DisplayPowerController2.java +6 −6 Original line number Diff line number Diff line Loading @@ -1250,10 +1250,10 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal // user, or is a temporary adjustment. boolean userInitiatedChange = (Float.isNaN(brightnessState)) && (autoBrightnessAdjustmentChanged || userSetBrightnessChanged); boolean hadUserBrightnessPoint = false; boolean wasShortTermModelActive = false; // Configure auto-brightness. if (mAutomaticBrightnessController != null) { hadUserBrightnessPoint = mAutomaticBrightnessController.hasUserDataPoints(); wasShortTermModelActive = mAutomaticBrightnessController.hasUserDataPoints(); mAutomaticBrightnessController.configure(autoBrightnessState, mBrightnessConfiguration, mDisplayBrightnessController.getLastUserSetScreenBrightness(), Loading Loading @@ -1538,7 +1538,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal userInitiatedChange = false; } notifyBrightnessTrackerChanged(brightnessState, userInitiatedChange, hadUserBrightnessPoint); wasShortTermModelActive); } // We save the brightness info *after* the brightness setting has been changed and Loading Loading @@ -1580,7 +1580,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal mTempBrightnessEvent.setRbcStrength(mCdsi != null ? mCdsi.getReduceBrightColorsStrength() : -1); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setWasShortTermModelActive(hadUserBrightnessPoint); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setDisplayBrightnessStrategyName(displayBrightnessState .getDisplayBrightnessStrategyName()); // Temporary is what we use during slider interactions. We avoid logging those so that Loading Loading @@ -2221,7 +2221,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal } private void notifyBrightnessTrackerChanged(float brightness, boolean userInitiated, boolean hadUserDataPoint) { boolean wasShortTermModelActive) { final float brightnessInNits = convertToNits(brightness); if (mUseAutoBrightness && brightnessInNits >= 0.0f && mAutomaticBrightnessController != null && mBrightnessTracker != null) { Loading @@ -2232,7 +2232,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal ? mPowerRequest.screenLowPowerBrightnessFactor : 1.0f; mBrightnessTracker.notifyBrightnessChanged(brightnessInNits, userInitiated, powerFactor, hadUserDataPoint, powerFactor, wasShortTermModelActive, mAutomaticBrightnessController.isDefaultConfig(), mUniqueDisplayId, mAutomaticBrightnessController.getLastSensorValues(), mAutomaticBrightnessController.getLastSensorTimestamps()); Loading