Merge "Add system properties for screen state and brightness." into rvc-dev am: 93e82cb1ed am: 13f562577f
Change-Id: I0aa43035350830daad960734ddbe44c6776ec6f0
This commit is contained in:
@@ -42,6 +42,7 @@ import android.os.Message;
|
|||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
import android.os.SystemProperties;
|
||||||
import android.os.Trace;
|
import android.os.Trace;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
@@ -1243,6 +1244,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
|
|
||||||
if (!reportOnly) {
|
if (!reportOnly) {
|
||||||
Trace.traceCounter(Trace.TRACE_TAG_POWER, "ScreenState", state);
|
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);
|
mPowerState.setScreenState(state);
|
||||||
// Tell battery stats about the transition.
|
// Tell battery stats about the transition.
|
||||||
try {
|
try {
|
||||||
@@ -1319,6 +1322,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
}
|
}
|
||||||
if (mScreenBrightnessRampAnimator.animateTo(target, rate)) {
|
if (mScreenBrightnessRampAnimator.animateTo(target, rate)) {
|
||||||
Trace.traceCounter(Trace.TRACE_TAG_POWER, "TargetScreenBrightness", (int) target);
|
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 {
|
try {
|
||||||
// TODO(brightnessfloat): change BatteryStats to use float
|
// TODO(brightnessfloat): change BatteryStats to use float
|
||||||
mBatteryStats.noteScreenBrightness(
|
mBatteryStats.noteScreenBrightness(
|
||||||
|
|||||||
Reference in New Issue
Block a user