Only log internal display interactions.

Add this to DPC2 as well.

Bug: 236234158
Test: statsd_testdrive 492

Change-Id: I9147baf94dc69b877afc78a0b0387df6d5718593
This commit is contained in:
Fiona Campbell
2022-11-11 14:40:28 +00:00
parent 33e735d76d
commit 4bf3c4a945

View File

@@ -2511,19 +2511,22 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal
float appliedThermalCapNits =
event.getThermalMax() == PowerManager.BRIGHTNESS_MAX
? -1f : convertToNits(event.getThermalMax());
FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED,
convertToNits(event.getInitialBrightness()),
convertToNits(event.getBrightness()),
event.getSlowAmbientLux(),
event.getPhysicalDisplayId(),
event.isShortTermModelActive(),
appliedLowPowerMode,
appliedRbcStrength,
appliedHbmMaxNits,
appliedThermalCapNits,
event.isAutomaticBrightnessEnabled(),
FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED__REASON__REASON_MANUAL);
if (mLogicalDisplay.getPrimaryDisplayDeviceLocked() != null
&& mLogicalDisplay.getPrimaryDisplayDeviceLocked()
.getDisplayDeviceInfoLocked().type == Display.TYPE_INTERNAL) {
FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED,
convertToNits(event.getInitialBrightness()),
convertToNits(event.getBrightness()),
event.getSlowAmbientLux(),
event.getPhysicalDisplayId(),
event.isShortTermModelActive(),
appliedLowPowerMode,
appliedRbcStrength,
appliedHbmMaxNits,
appliedThermalCapNits,
event.isAutomaticBrightnessEnabled(),
FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED__REASON__REASON_MANUAL);
}
}
private final class DisplayControllerHandler extends Handler {