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

Commit ffcd75f9 authored by Long Ling's avatar Long Ling
Browse files

DMD: update BrightnessObserver dump

Dump the latest sensor data and the latest filtered sensor data that
BrightnessObserver has received.

Bug: 141529467
Change-Id: I3b175cbf451f834306d2c1bd6d2edb58aaf27d5d
parent 55c70caa
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1050,6 +1050,7 @@ public class DisplayModeDirector {

        public void dumpLocked(PrintWriter pw) {
            pw.println("  BrightnessObserver");
            pw.println("    mAmbientLux: " + mAmbientLux);
            pw.println("    mRefreshRateInZone: " + mRefreshRateInZone);

            for (int d: mDisplayBrightnessThresholds) {
@@ -1059,6 +1060,8 @@ public class DisplayModeDirector {
            for (int d: mAmbientBrightnessThresholds) {
                pw.println("    mAmbientBrightnessThreshold: " + d);
            }

            mLightSensorListener.dumpLocked(pw);
        }

        public void onDisplayChanged(int displayId) {
@@ -1222,6 +1225,10 @@ public class DisplayModeDirector {
            final private static int INJECT_EVENTS_INTERVAL_MS = LIGHT_SENSOR_RATE_MS;
            private float mLastSensorData;

            public void dumpLocked(PrintWriter pw) {
                pw.println("    mLastSensorData: " + mLastSensorData);
            }

            @Override
            public void onSensorChanged(SensorEvent event) {
                mLastSensorData = event.values[0];