Loading services/core/java/com/android/server/display/DisplayPowerController.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1887,6 +1887,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call ? mCdsi.getReduceBrightColorsStrength() : -1); ? mCdsi.getReduceBrightColorsStrength() : -1); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); // Temporary is what we use during slider interactions. We avoid logging those so that // 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. // we don't spam logcat when the slider is being used. boolean tempToTempTransition = boolean tempToTempTransition = Loading @@ -1895,9 +1896,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call == BrightnessReason.REASON_TEMPORARY; == BrightnessReason.REASON_TEMPORARY; if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) || brightnessAdjustmentFlags != 0) { || brightnessAdjustmentFlags != 0) { float lastBrightness = mLastBrightnessEvent.getBrightness(); mTempBrightnessEvent.setInitialBrightness(mLastBrightnessEvent.getBrightness()); mTempBrightnessEvent.setInitialBrightness(lastBrightness); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); // Adjustment flags (and user-set flag) only get added after the equality checks since // Adjustment flags (and user-set flag) only get added after the equality checks since Loading services/core/java/com/android/server/display/DisplayPowerController2.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1597,6 +1597,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setDisplayBrightnessStrategyName(displayBrightnessState mTempBrightnessEvent.setDisplayBrightnessStrategyName(displayBrightnessState .getDisplayBrightnessStrategyName()); .getDisplayBrightnessStrategyName()); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); // Temporary is what we use during slider interactions. We avoid logging those so that // 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. // we don't spam logcat when the slider is being used. boolean tempToTempTransition = boolean tempToTempTransition = Loading @@ -1605,9 +1606,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal == BrightnessReason.REASON_TEMPORARY; == BrightnessReason.REASON_TEMPORARY; if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) || brightnessAdjustmentFlags != 0) { || brightnessAdjustmentFlags != 0) { float lastBrightness = mLastBrightnessEvent.getBrightness(); mTempBrightnessEvent.setInitialBrightness(mLastBrightnessEvent.getBrightness()); mTempBrightnessEvent.setInitialBrightness(lastBrightness); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); // Adjustment flags (and user-set flag) only get added after the equality checks since // Adjustment flags (and user-set flag) only get added after the equality checks since Loading services/core/java/com/android/server/display/brightness/BrightnessEvent.java +0 −2 Original line number Original line Diff line number Diff line Loading @@ -142,8 +142,6 @@ public final class BrightnessEvent { && Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux) && Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux) && Float.floatToRawIntBits(mPreThresholdLux) && Float.floatToRawIntBits(mPreThresholdLux) == Float.floatToRawIntBits(that.mPreThresholdLux) == Float.floatToRawIntBits(that.mPreThresholdLux) && Float.floatToRawIntBits(mInitialBrightness) == Float.floatToRawIntBits(that.mInitialBrightness) && Float.floatToRawIntBits(mBrightness) && Float.floatToRawIntBits(mBrightness) == Float.floatToRawIntBits(that.mBrightness) == Float.floatToRawIntBits(that.mBrightness) && Float.floatToRawIntBits(mRecommendedBrightness) && Float.floatToRawIntBits(mRecommendedBrightness) Loading Loading
services/core/java/com/android/server/display/DisplayPowerController.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1887,6 +1887,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call ? mCdsi.getReduceBrightColorsStrength() : -1); ? mCdsi.getReduceBrightColorsStrength() : -1); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); // Temporary is what we use during slider interactions. We avoid logging those so that // 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. // we don't spam logcat when the slider is being used. boolean tempToTempTransition = boolean tempToTempTransition = Loading @@ -1895,9 +1896,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call == BrightnessReason.REASON_TEMPORARY; == BrightnessReason.REASON_TEMPORARY; if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) || brightnessAdjustmentFlags != 0) { || brightnessAdjustmentFlags != 0) { float lastBrightness = mLastBrightnessEvent.getBrightness(); mTempBrightnessEvent.setInitialBrightness(mLastBrightnessEvent.getBrightness()); mTempBrightnessEvent.setInitialBrightness(lastBrightness); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); // Adjustment flags (and user-set flag) only get added after the equality checks since // Adjustment flags (and user-set flag) only get added after the equality checks since Loading
services/core/java/com/android/server/display/DisplayPowerController2.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1597,6 +1597,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive); mTempBrightnessEvent.setDisplayBrightnessStrategyName(displayBrightnessState mTempBrightnessEvent.setDisplayBrightnessStrategyName(displayBrightnessState .getDisplayBrightnessStrategyName()); .getDisplayBrightnessStrategyName()); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); // Temporary is what we use during slider interactions. We avoid logging those so that // 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. // we don't spam logcat when the slider is being used. boolean tempToTempTransition = boolean tempToTempTransition = Loading @@ -1605,9 +1606,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal == BrightnessReason.REASON_TEMPORARY; == BrightnessReason.REASON_TEMPORARY; if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition) || brightnessAdjustmentFlags != 0) { || brightnessAdjustmentFlags != 0) { float lastBrightness = mLastBrightnessEvent.getBrightness(); mTempBrightnessEvent.setInitialBrightness(mLastBrightnessEvent.getBrightness()); mTempBrightnessEvent.setInitialBrightness(lastBrightness); mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); mLastBrightnessEvent.copyFrom(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent); // Adjustment flags (and user-set flag) only get added after the equality checks since // Adjustment flags (and user-set flag) only get added after the equality checks since Loading
services/core/java/com/android/server/display/brightness/BrightnessEvent.java +0 −2 Original line number Original line Diff line number Diff line Loading @@ -142,8 +142,6 @@ public final class BrightnessEvent { && Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux) && Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux) && Float.floatToRawIntBits(mPreThresholdLux) && Float.floatToRawIntBits(mPreThresholdLux) == Float.floatToRawIntBits(that.mPreThresholdLux) == Float.floatToRawIntBits(that.mPreThresholdLux) && Float.floatToRawIntBits(mInitialBrightness) == Float.floatToRawIntBits(that.mInitialBrightness) && Float.floatToRawIntBits(mBrightness) && Float.floatToRawIntBits(mBrightness) == Float.floatToRawIntBits(that.mBrightness) == Float.floatToRawIntBits(that.mBrightness) && Float.floatToRawIntBits(mRecommendedBrightness) && Float.floatToRawIntBits(mRecommendedBrightness) Loading