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

Commit b456bec0 authored by Fiona Campbell's avatar Fiona Campbell Committed by Android (Google) Code Review
Browse files

Merge "Add idleEnabled to brightness event logging" into tm-qpr-dev

parents 3ad54047 78cc78ca
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -344,7 +344,9 @@ class AutomaticBrightnessController {
            brightnessEvent.recommendedBrightness = mScreenAutoBrightness;
            brightnessEvent.flags |= (!mAmbientLuxValid ? BrightnessEvent.FLAG_INVALID_LUX : 0)
                    | (mDisplayPolicy == DisplayPowerRequest.POLICY_DOZE
                        ? BrightnessEvent.FLAG_DOZE_SCALE : 0);
                        ? BrightnessEvent.FLAG_DOZE_SCALE : 0)
                    | (mCurrentBrightnessMapper.isForIdleMode()
                        ? BrightnessEvent.FLAG_IDLE_CURVE : 0);
        }

        if (!mAmbientLuxValid) {
+5 −3
Original line number Diff line number Diff line
@@ -2738,8 +2738,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
    class BrightnessEvent {
        static final int FLAG_RBC = 0x1;
        static final int FLAG_INVALID_LUX = 0x2;
        static final int FLAG_DOZE_SCALE = 0x3;
        static final int FLAG_USER_SET = 0x4;
        static final int FLAG_DOZE_SCALE = 0x4;
        static final int FLAG_USER_SET = 0x8;
        static final int FLAG_IDLE_CURVE = 0x16;

        public final BrightnessReason reason = new BrightnessReason();

@@ -2843,7 +2844,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
            return ((flags & FLAG_USER_SET) != 0 ? "user_set " : "")
                    + ((flags & FLAG_RBC) != 0 ? "rbc " : "")
                    + ((flags & FLAG_INVALID_LUX) != 0 ? "invalid_lux " : "")
                    + ((flags & FLAG_DOZE_SCALE) != 0 ? "doze_scale " : "");
                    + ((flags & FLAG_DOZE_SCALE) != 0 ? "doze_scale " : "")
                    + ((flags & FLAG_DOZE_SCALE) != 0 ? "idle_curve " : "");
        }
    }