Merge "Don't overlog BrightnessEvents" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3568b128c1
@@ -1887,6 +1887,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
? mCdsi.getReduceBrightColorsStrength() : -1);
|
||||
mTempBrightnessEvent.setPowerFactor(mPowerRequest.screenLowPowerBrightnessFactor);
|
||||
mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive);
|
||||
mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness);
|
||||
// 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 =
|
||||
@@ -1895,9 +1896,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
== BrightnessReason.REASON_TEMPORARY;
|
||||
if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition)
|
||||
|| brightnessAdjustmentFlags != 0) {
|
||||
float lastBrightness = mLastBrightnessEvent.getBrightness();
|
||||
mTempBrightnessEvent.setInitialBrightness(lastBrightness);
|
||||
mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness);
|
||||
mTempBrightnessEvent.setInitialBrightness(mLastBrightnessEvent.getBrightness());
|
||||
mLastBrightnessEvent.copyFrom(mTempBrightnessEvent);
|
||||
BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent);
|
||||
// Adjustment flags (and user-set flag) only get added after the equality checks since
|
||||
|
||||
@@ -1597,6 +1597,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal
|
||||
mTempBrightnessEvent.setWasShortTermModelActive(wasShortTermModelActive);
|
||||
mTempBrightnessEvent.setDisplayBrightnessStrategyName(displayBrightnessState
|
||||
.getDisplayBrightnessStrategyName());
|
||||
mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness);
|
||||
// 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 =
|
||||
@@ -1605,9 +1606,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal
|
||||
== BrightnessReason.REASON_TEMPORARY;
|
||||
if ((!mTempBrightnessEvent.equalsMainData(mLastBrightnessEvent) && !tempToTempTransition)
|
||||
|| brightnessAdjustmentFlags != 0) {
|
||||
float lastBrightness = mLastBrightnessEvent.getBrightness();
|
||||
mTempBrightnessEvent.setInitialBrightness(lastBrightness);
|
||||
mTempBrightnessEvent.setAutomaticBrightnessEnabled(mUseAutoBrightness);
|
||||
mTempBrightnessEvent.setInitialBrightness(mLastBrightnessEvent.getBrightness());
|
||||
mLastBrightnessEvent.copyFrom(mTempBrightnessEvent);
|
||||
BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent);
|
||||
// Adjustment flags (and user-set flag) only get added after the equality checks since
|
||||
|
||||
@@ -142,8 +142,6 @@ public final class BrightnessEvent {
|
||||
&& Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux)
|
||||
&& Float.floatToRawIntBits(mPreThresholdLux)
|
||||
== Float.floatToRawIntBits(that.mPreThresholdLux)
|
||||
&& Float.floatToRawIntBits(mInitialBrightness)
|
||||
== Float.floatToRawIntBits(that.mInitialBrightness)
|
||||
&& Float.floatToRawIntBits(mBrightness)
|
||||
== Float.floatToRawIntBits(that.mBrightness)
|
||||
&& Float.floatToRawIntBits(mRecommendedBrightness)
|
||||
|
||||
Reference in New Issue
Block a user