summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/lights/LightsService.java4
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java13
2 files changed, 16 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/lights/LightsService.java b/services/core/java/com/android/server/lights/LightsService.java
index 16dde26..d4762bd 100644
--- a/services/core/java/com/android/server/lights/LightsService.java
+++ b/services/core/java/com/android/server/lights/LightsService.java
@@ -113,9 +113,10 @@ public class LightsService extends SystemService {
private void setLightLocked(int color, int mode, int onMS, int offMS, int brightnessMode) {
if (mModesUpdate || color != mColor || mode != mMode || onMS != mOnMS ||
- offMS != mOffMS) {
+ offMS != mOffMS || mReset) {
if (DEBUG) Slog.v(TAG, "setLight #" + mId + ": color=#"
+ Integer.toHexString(color));
+ mReset = false;
mColor = color;
mMode = mode;
mOnMS = onMS;
@@ -141,6 +142,7 @@ public class LightsService extends SystemService {
private boolean mFlashing;
private boolean mModesUpdate;
private boolean mMultipleLeds;
+ private boolean mReset = true;
}
public LightsService(Context context) {
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 6f44911..c519120 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -128,6 +128,8 @@ import com.android.server.UiThread;
import com.android.server.Watchdog;
import com.android.server.am.BatteryStatsService;
import com.android.server.input.InputManagerService;
+import com.android.server.lights.Light;
+import com.android.server.lights.LightsManager;
import com.android.server.policy.PhoneWindowManager;
import com.android.server.power.ShutdownThread;
@@ -5928,6 +5930,17 @@ public class WindowManagerService extends IWindowManager.Stub
mPolicy.enableScreenAfterBoot();
+ // clear any intrusive lighting which may still be on from the
+ // crypto landing ui
+ LightsManager lm = LocalServices.getService(LightsManager.class);
+ Light batteryLight = lm.getLight(LightsManager.LIGHT_ID_BATTERY);
+ Light notifLight = lm.getLight(LightsManager.LIGHT_ID_NOTIFICATIONS);
+ if (batteryLight != null) {
+ batteryLight.turnOff();
+ }
+ if (notifLight != null) {
+ notifLight.turnOff();
+ }
// Make sure the last requested orientation has been applied.
updateRotationUnchecked(false, false);
}