Merge "Ensure only internal display display interactions are logged." into tm-qpr-dev

This commit is contained in:
Silvia Vinyes
2022-11-11 13:58:23 +00:00
committed by Android (Google) Code Review

View File

@@ -2810,6 +2810,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
float appliedPowerFactor = event.isLowPowerModeSet() ? event.powerFactor : -1f; float appliedPowerFactor = event.isLowPowerModeSet() ? event.powerFactor : -1f;
if (mLogicalDisplay.getPrimaryDisplayDeviceLocked() != null
&& mLogicalDisplay.getPrimaryDisplayDeviceLocked()
.getDisplayDeviceInfoLocked().type == Display.TYPE_INTERNAL) {
FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED, FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED,
convertToNits(event.initialBrightness), convertToNits(event.initialBrightness),
convertToNits(event.brightness), convertToNits(event.brightness),
@@ -2823,6 +2826,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
event.automaticBrightnessEnabled, event.automaticBrightnessEnabled,
FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED__REASON__REASON_MANUAL); FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED__REASON__REASON_MANUAL);
} }
}
class BrightnessEvent { class BrightnessEvent {
static final int FLAG_RBC = 0x1; static final int FLAG_RBC = 0x1;