diff --git a/services/java/com/android/server/power/PowerManagerService.java b/services/java/com/android/server/power/PowerManagerService.java index cb6db3cec8289..1a5f23355d396 100644 --- a/services/java/com/android/server/power/PowerManagerService.java +++ b/services/java/com/android/server/power/PowerManagerService.java @@ -426,7 +426,7 @@ public class PowerManagerService extends IPowerManager.Stub } // stop the screensaver if we're now unplugged - if (mPolicy != null) { + if (mPolicy != null && wasPowered) { mPolicy.stopScreenSaver(); } }