Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08254266 authored by Silvia Vinyes's avatar Silvia Vinyes
Browse files

Ensure only internal display display interactions are logged.

Bug:236234158

Change-Id: I473867eb37ae6d862759ab1f4fad95bb7bb96616
Test: statsd_testdrive
(cherry picked from commit fedad29a)
Merged-in: I473867eb37ae6d862759ab1f4fad95bb7bb96616
parent dcb12923
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -2810,6 +2810,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call

        float appliedPowerFactor = event.isLowPowerModeSet() ? event.powerFactor : -1f;

        if (mLogicalDisplay.getPrimaryDisplayDeviceLocked() != null
                && mLogicalDisplay.getPrimaryDisplayDeviceLocked()
                    .getDisplayDeviceInfoLocked().type == Display.TYPE_INTERNAL) {
            FrameworkStatsLog.write(FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED,
                    convertToNits(event.initialBrightness),
                    convertToNits(event.brightness),
@@ -2823,6 +2826,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                    event.automaticBrightnessEnabled,
                    FrameworkStatsLog.DISPLAY_BRIGHTNESS_CHANGED__REASON__REASON_MANUAL);
        }
    }

    class BrightnessEvent {
        static final int FLAG_RBC = 0x1;