summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorKevin Hester-Chow <khester@google.com>2012-03-05 08:01:00 -0800
committerKevin Hester-Chow <khester@google.com>2012-03-05 08:01:00 -0800
commit2d72be20fe950209c389c6368e785aab6fb2c1a0 (patch)
treefcd8c80c7a81acf262cc0bd5ce673ad312d702b1 /services
parent7cdf617f43c0729892ff0b0b08c94d755db7b218 (diff)
downloadframeworks_base-2d72be20fe950209c389c6368e785aab6fb2c1a0.zip
frameworks_base-2d72be20fe950209c389c6368e785aab6fb2c1a0.tar.gz
frameworks_base-2d72be20fe950209c389c6368e785aab6fb2c1a0.tar.bz2
Do not assume that there is always a running activity
(Necessary for headless devices) Change-Id: I61969ebfdd4aa02a3661272a0bcd0aa67667f115
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 96a6e58..5e58a53 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -7157,7 +7157,7 @@ public final class ActivityManagerService extends ActivityManagerNative
mMainStack.resumeTopActivityLocked(null);
} else {
ActivityRecord r = mMainStack.topRunningActivityLocked(null);
- if (r.app == app) {
+ if (r != null && r.app == app) {
// If the top running activity is from this crashing
// process, then terminate it to avoid getting in a loop.
Slog.w(TAG, " Force finishing activity "