Merge "Fix wrong use of power mode over power boost"

This commit is contained in:
TreeHugger Robot
2020-05-20 13:13:40 +00:00
committed by Android (Google) Code Review

View File

@@ -44,6 +44,7 @@ import android.hardware.SystemSensorManager;
import android.hardware.display.AmbientDisplayConfiguration;
import android.hardware.display.DisplayManagerInternal;
import android.hardware.display.DisplayManagerInternal.DisplayPowerRequest;
import android.hardware.power.Boost;
import android.hardware.power.Mode;
import android.net.Uri;
import android.os.BatteryManager;
@@ -321,7 +322,7 @@ public final class PowerManagerService extends SystemService
private long mLastUserActivityTime;
private long mLastUserActivityTimeNoChangeLights;
// Timestamp of last time power mode was set to interactive.
// Timestamp of last time power boost interaction was sent.
private long mLastInteractivePowerHintTime;
// Timestamp of the last screen brightness boost.
@@ -1589,7 +1590,7 @@ public final class PowerManagerService extends SystemService
Trace.traceBegin(Trace.TRACE_TAG_POWER, "userActivity");
try {
if (eventTime > mLastInteractivePowerHintTime) {
setPowerModeInternal(Mode.INTERACTIVE, false);
setPowerBoostInternal(Boost.INTERACTION, 0);
mLastInteractivePowerHintTime = eventTime;
}