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

Commit ad823415 authored by Simon MacMullen's avatar Simon MacMullen Committed by Automerger Merge Worker
Browse files

Merge "Add system properties for screen state and brightness." into rvc-dev...

Merge "Add system properties for screen state and brightness." into rvc-dev am: 93e82cb1 am: 13f56257 am: 70e77f49

Change-Id: Iae3b7aa2fe4828a3cd679f45970906c9958fbd4d
parents 61635bc9 70e77f49
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.provider.Settings;
@@ -1243,6 +1244,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call

            if (!reportOnly) {
                Trace.traceCounter(Trace.TRACE_TAG_POWER, "ScreenState", state);
                // TODO(b/153319140) remove when we can get this from the above trace invocation
                SystemProperties.set("debug.tracing.screen_state", String.valueOf(state));
                mPowerState.setScreenState(state);
                // Tell battery stats about the transition.
                try {
@@ -1319,6 +1322,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        }
        if (mScreenBrightnessRampAnimator.animateTo(target, rate)) {
            Trace.traceCounter(Trace.TRACE_TAG_POWER, "TargetScreenBrightness", (int) target);
            // TODO(b/153319140) remove when we can get this from the above trace invocation
            SystemProperties.set("debug.tracing.screen_brightness", String.valueOf(target));
            try {
                // TODO(brightnessfloat): change BatteryStats to use float
                mBatteryStats.noteScreenBrightness(