diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index edc333458c59a..60d3d1ec349b1 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -1308,7 +1308,9 @@ final class ActivityStack { // It is possible the activity was freezing the screen before it was paused. // In that case go ahead and remove the freeze this activity has on the screen // since it is no longer visible. - prev.stopFreezingScreenLocked(true /*force*/); + if (prev != null) { + prev.stopFreezingScreenLocked(true /*force*/); + } mPausingActivity = null; }