Fixed NPE when pause is complete on a dead app.

Cause by trying to stop freezing the screen on an activity
record whose refrence we already set to null because the app
is dead. WM will no longer freeze the screen for a dead app.

Bug: 31441504
Change-Id: I6617a5536bce5748b2f4559428ee856f54f0ab81
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index edc3334..60d3d1e 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 @@
             // 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;
         }