Fixed patch

This commit is contained in:
Nehemiah of Zebulun 2023-12-12 10:57:38 -05:00
parent 6c8d19eb4c
commit 8bf26c5805

View File

@ -1,8 +1,8 @@
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 1224902aa7be..68855ebf06b9 100644
index 6a57e4070f65..ae544b5e9d56 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -70,6 +70,10 @@ import com.android.server.display.whitebalance.DisplayWhiteBalanceFactory;
@@ -75,6 +75,10 @@ import com.android.server.display.whitebalance.DisplayWhiteBalanceFactory;
import com.android.server.display.whitebalance.DisplayWhiteBalanceSettings;
import com.android.server.policy.WindowManagerPolicy;
@ -11,9 +11,9 @@ index 1224902aa7be..68855ebf06b9 100644
+import com.android.server.lights.LogicalLight;
+
import java.io.PrintWriter;
import java.util.Objects;
/**
@@ -276,6 +280,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -294,6 +298,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// Must only be accessed on the handler thread.
private DisplayPowerState mPowerState;
@ -24,7 +24,7 @@ index 1224902aa7be..68855ebf06b9 100644
// True if the device should wait for negative proximity sensor before
// waking up the screen. This is set to false as soon as a negative
// proximity sensor measurement is observed or when the device is forced to
@@ -817,6 +825,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -895,6 +903,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mPowerState = new DisplayPowerState(mBlanker,
mColorFadeEnabled ? new ColorFade(mDisplayId) : null, mDisplayId, displayState);
@ -34,7 +34,7 @@ index 1224902aa7be..68855ebf06b9 100644
if (mColorFadeEnabled) {
mColorFadeOnAnimator = ObjectAnimator.ofFloat(
mPowerState, DisplayPowerState.COLOR_FADE_LEVEL, 0.0f, 1.0f);
@@ -1452,6 +1463,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -1677,6 +1688,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
&& mReportedScreenStateToPolicy == REPORTED_TO_POLICY_SCREEN_TURNING_ON) {
setReportedScreenState(REPORTED_TO_POLICY_SCREEN_ON);
mWindowManagerPolicy.screenTurnedOn(mDisplayId);
@ -42,7 +42,7 @@ index 1224902aa7be..68855ebf06b9 100644
}
// Grab a wake lock if we have unfinished business.
@@ -1652,6 +1664,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -1926,6 +1938,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
setReportedScreenState(REPORTED_TO_POLICY_SCREEN_OFF);
unblockScreenOn();
mWindowManagerPolicy.screenTurnedOff(mDisplayId);
@ -50,7 +50,7 @@ index 1224902aa7be..68855ebf06b9 100644
} else if (!isOff
&& mReportedScreenStateToPolicy == REPORTED_TO_POLICY_SCREEN_TURNING_OFF) {
@@ -1659,6 +1672,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -1933,6 +1946,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// Complete the full state transition on -> turningOff -> off.
unblockScreenOff();
mWindowManagerPolicy.screenTurnedOff(mDisplayId);