summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/java/com/android/server/power/PowerManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/power/PowerManagerService.java b/services/java/com/android/server/power/PowerManagerService.java
index cb6db3cec828..1a5f23355d39 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();
}
}