Merge "Fix lux and STM parameter of slider event." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
41fb1179c5
@@ -1677,7 +1677,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
mTempBrightnessEvent.rbcStrength = mCdsi != null
|
mTempBrightnessEvent.rbcStrength = mCdsi != null
|
||||||
? mCdsi.getReduceBrightColorsStrength() : -1;
|
? mCdsi.getReduceBrightColorsStrength() : -1;
|
||||||
mTempBrightnessEvent.powerFactor = mPowerRequest.screenLowPowerBrightnessFactor;
|
mTempBrightnessEvent.powerFactor = mPowerRequest.screenLowPowerBrightnessFactor;
|
||||||
|
mTempBrightnessEvent.wasShortTermModelActive = hadUserBrightnessPoint;
|
||||||
// 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 =
|
||||||
@@ -1687,12 +1687,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
|| brightnessAdjustmentFlags != 0) {
|
|| brightnessAdjustmentFlags != 0) {
|
||||||
float lastBrightness = mLastBrightnessEvent.brightness;
|
float lastBrightness = mLastBrightnessEvent.brightness;
|
||||||
mTempBrightnessEvent.initialBrightness = lastBrightness;
|
mTempBrightnessEvent.initialBrightness = lastBrightness;
|
||||||
mTempBrightnessEvent.fastAmbientLux =
|
|
||||||
mAutomaticBrightnessController == null
|
|
||||||
? -1f : mAutomaticBrightnessController.getFastAmbientLux();
|
|
||||||
mTempBrightnessEvent.slowAmbientLux =
|
|
||||||
mAutomaticBrightnessController == null
|
|
||||||
? -1f : mAutomaticBrightnessController.getSlowAmbientLux();
|
|
||||||
mTempBrightnessEvent.automaticBrightnessEnabled = mPowerRequest.useAutoBrightness;
|
mTempBrightnessEvent.automaticBrightnessEnabled = mPowerRequest.useAutoBrightness;
|
||||||
mLastBrightnessEvent.copyFrom(mTempBrightnessEvent);
|
mLastBrightnessEvent.copyFrom(mTempBrightnessEvent);
|
||||||
BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent);
|
BrightnessEvent newEvent = new BrightnessEvent(mTempBrightnessEvent);
|
||||||
@@ -2579,7 +2573,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
pw.println(" mCachedBrightnessInfo.hbmTransitionPoint=" +
|
pw.println(" mCachedBrightnessInfo.hbmTransitionPoint=" +
|
||||||
mCachedBrightnessInfo.hbmTransitionPoint.value);
|
mCachedBrightnessInfo.hbmTransitionPoint.value);
|
||||||
pw.println(" mCachedBrightnessInfo.brightnessMaxReason =" +
|
pw.println(" mCachedBrightnessInfo.brightnessMaxReason =" +
|
||||||
mCachedBrightnessInfo.brightnessMaxReason .value);
|
mCachedBrightnessInfo.brightnessMaxReason.value);
|
||||||
}
|
}
|
||||||
pw.println(" mDisplayBlanksAfterDozeConfig=" + mDisplayBlanksAfterDozeConfig);
|
pw.println(" mDisplayBlanksAfterDozeConfig=" + mDisplayBlanksAfterDozeConfig);
|
||||||
pw.println(" mBrightnessBucketsInDozeConfig=" + mBrightnessBucketsInDozeConfig);
|
pw.println(" mBrightnessBucketsInDozeConfig=" + mBrightnessBucketsInDozeConfig);
|
||||||
@@ -2816,9 +2810,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED,
|
FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED,
|
||||||
convertToNits(event.initialBrightness),
|
convertToNits(event.initialBrightness),
|
||||||
convertToNits(event.brightness),
|
convertToNits(event.brightness),
|
||||||
event.slowAmbientLux,
|
event.lux,
|
||||||
event.physicalDisplayId,
|
event.physicalDisplayId,
|
||||||
event.isShortTermModelActive(),
|
event.wasShortTermModelActive,
|
||||||
appliedPowerFactor,
|
appliedPowerFactor,
|
||||||
appliedRbcStrength,
|
appliedRbcStrength,
|
||||||
appliedHbmMaxNits,
|
appliedHbmMaxNits,
|
||||||
@@ -2841,8 +2835,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
public int displayId;
|
public int displayId;
|
||||||
public String physicalDisplayId;
|
public String physicalDisplayId;
|
||||||
public float lux;
|
public float lux;
|
||||||
public float fastAmbientLux;
|
|
||||||
public float slowAmbientLux;
|
|
||||||
public float preThresholdLux;
|
public float preThresholdLux;
|
||||||
public long time;
|
public long time;
|
||||||
public float brightness;
|
public float brightness;
|
||||||
@@ -2854,6 +2846,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
public float thermalMax;
|
public float thermalMax;
|
||||||
public float powerFactor;
|
public float powerFactor;
|
||||||
public int hbmMode;
|
public int hbmMode;
|
||||||
|
public boolean wasShortTermModelActive;
|
||||||
public int flags;
|
public int flags;
|
||||||
public int adjustmentFlags;
|
public int adjustmentFlags;
|
||||||
public boolean automaticBrightnessEnabled;
|
public boolean automaticBrightnessEnabled;
|
||||||
@@ -2872,8 +2865,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
physicalDisplayId = that.physicalDisplayId;
|
physicalDisplayId = that.physicalDisplayId;
|
||||||
time = that.time;
|
time = that.time;
|
||||||
lux = that.lux;
|
lux = that.lux;
|
||||||
fastAmbientLux = that.fastAmbientLux;
|
|
||||||
slowAmbientLux = that.slowAmbientLux;
|
|
||||||
preThresholdLux = that.preThresholdLux;
|
preThresholdLux = that.preThresholdLux;
|
||||||
brightness = that.brightness;
|
brightness = that.brightness;
|
||||||
initialBrightness = that.initialBrightness;
|
initialBrightness = that.initialBrightness;
|
||||||
@@ -2885,6 +2876,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
powerFactor = that.powerFactor;
|
powerFactor = that.powerFactor;
|
||||||
flags = that.flags;
|
flags = that.flags;
|
||||||
hbmMode = that.hbmMode;
|
hbmMode = that.hbmMode;
|
||||||
|
wasShortTermModelActive = that.wasShortTermModelActive;
|
||||||
reason.set(that.reason);
|
reason.set(that.reason);
|
||||||
adjustmentFlags = that.adjustmentFlags;
|
adjustmentFlags = that.adjustmentFlags;
|
||||||
automaticBrightnessEnabled = that.automaticBrightnessEnabled;
|
automaticBrightnessEnabled = that.automaticBrightnessEnabled;
|
||||||
@@ -2897,13 +2889,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
initialBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
|
initialBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
|
||||||
recommendedBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
|
recommendedBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
|
||||||
lux = 0f;
|
lux = 0f;
|
||||||
fastAmbientLux = 0f;
|
|
||||||
slowAmbientLux = 0f;
|
|
||||||
preThresholdLux = 0f;
|
preThresholdLux = 0f;
|
||||||
preThresholdBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
|
preThresholdBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
|
||||||
hbmMax = PowerManager.BRIGHTNESS_MAX;
|
hbmMax = PowerManager.BRIGHTNESS_MAX;
|
||||||
rbcStrength = 0;
|
rbcStrength = 0;
|
||||||
powerFactor = 1f;
|
powerFactor = 1f;
|
||||||
|
wasShortTermModelActive = false;
|
||||||
thermalMax = PowerManager.BRIGHTNESS_MAX;
|
thermalMax = PowerManager.BRIGHTNESS_MAX;
|
||||||
flags = 0;
|
flags = 0;
|
||||||
hbmMode = BrightnessInfo.HIGH_BRIGHTNESS_MODE_OFF;
|
hbmMode = BrightnessInfo.HIGH_BRIGHTNESS_MODE_OFF;
|
||||||
@@ -2938,10 +2929,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
&& Float.floatToRawIntBits(preThresholdBrightness)
|
&& Float.floatToRawIntBits(preThresholdBrightness)
|
||||||
== Float.floatToRawIntBits(that.preThresholdBrightness)
|
== Float.floatToRawIntBits(that.preThresholdBrightness)
|
||||||
&& Float.floatToRawIntBits(lux) == Float.floatToRawIntBits(that.lux)
|
&& Float.floatToRawIntBits(lux) == Float.floatToRawIntBits(that.lux)
|
||||||
&& Float.floatToRawIntBits(fastAmbientLux)
|
|
||||||
== Float.floatToRawIntBits(that.fastAmbientLux)
|
|
||||||
&& Float.floatToRawIntBits(slowAmbientLux)
|
|
||||||
== Float.floatToRawIntBits(that.slowAmbientLux)
|
|
||||||
&& Float.floatToRawIntBits(preThresholdLux)
|
&& Float.floatToRawIntBits(preThresholdLux)
|
||||||
== Float.floatToRawIntBits(that.preThresholdLux)
|
== Float.floatToRawIntBits(that.preThresholdLux)
|
||||||
&& rbcStrength == that.rbcStrength
|
&& rbcStrength == that.rbcStrength
|
||||||
@@ -2951,6 +2938,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
== Float.floatToRawIntBits(that.thermalMax)
|
== Float.floatToRawIntBits(that.thermalMax)
|
||||||
&& Float.floatToRawIntBits(powerFactor)
|
&& Float.floatToRawIntBits(powerFactor)
|
||||||
== Float.floatToRawIntBits(that.powerFactor)
|
== Float.floatToRawIntBits(that.powerFactor)
|
||||||
|
&& wasShortTermModelActive == that.wasShortTermModelActive
|
||||||
&& flags == that.flags
|
&& flags == that.flags
|
||||||
&& adjustmentFlags == that.adjustmentFlags
|
&& adjustmentFlags == that.adjustmentFlags
|
||||||
&& reason.equals(that.reason)
|
&& reason.equals(that.reason)
|
||||||
@@ -2967,14 +2955,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
+ ", rcmdBrt=" + recommendedBrightness
|
+ ", rcmdBrt=" + recommendedBrightness
|
||||||
+ ", preBrt=" + preThresholdBrightness
|
+ ", preBrt=" + preThresholdBrightness
|
||||||
+ ", lux=" + lux
|
+ ", lux=" + lux
|
||||||
+ ", fastAmbientLux=" + fastAmbientLux
|
|
||||||
+ ", slowAmbientLux=" + slowAmbientLux
|
|
||||||
+ ", preLux=" + preThresholdLux
|
+ ", preLux=" + preThresholdLux
|
||||||
+ ", hbmMax=" + hbmMax
|
+ ", hbmMax=" + hbmMax
|
||||||
+ ", hbmMode=" + BrightnessInfo.hbmToString(hbmMode)
|
+ ", hbmMode=" + BrightnessInfo.hbmToString(hbmMode)
|
||||||
+ ", rbcStrength=" + rbcStrength
|
+ ", rbcStrength=" + rbcStrength
|
||||||
+ ", powerFactor=" + powerFactor
|
+ ", powerFactor=" + powerFactor
|
||||||
+ ", thrmMax=" + thermalMax
|
+ ", thrmMax=" + thermalMax
|
||||||
|
+ ", wasShortTermModelActive=" + wasShortTermModelActive
|
||||||
+ ", flags=" + flagsToString()
|
+ ", flags=" + flagsToString()
|
||||||
+ ", reason=" + reason.toString(adjustmentFlags)
|
+ ", reason=" + reason.toString(adjustmentFlags)
|
||||||
+ ", autoBrightness=" + automaticBrightnessEnabled;
|
+ ", autoBrightness=" + automaticBrightnessEnabled;
|
||||||
|
|||||||
Reference in New Issue
Block a user