diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-03-10 17:02:27 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-03-10 17:02:27 -0800 |
commit | cb44d96173e59139a8a5c83246a3a40aaca1d277 (patch) | |
tree | 41ac65e63a8dc013e3b77b8be376a5d4d60dda8c /services/java | |
parent | a925cd4101dceefae6b9c0634084f9fa72b12344 (diff) | |
download | frameworks_base-cb44d96173e59139a8a5c83246a3a40aaca1d277.zip frameworks_base-cb44d96173e59139a8a5c83246a3a40aaca1d277.tar.gz frameworks_base-cb44d96173e59139a8a5c83246a3a40aaca1d277.tar.bz2 |
Fix issue #4084124: Wingray Often see black screen after market ANR due to 4084121
Need to resume the top activity after force removing a crashing
app's activities.
Change-Id: Id3384b2aa73039a9b1e72c2201d3ab0ef5b4f61f
Diffstat (limited to 'services/java')
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 6d44bb5..267c76a 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -6682,8 +6682,10 @@ public final class ActivityManagerService extends ActivityManagerNative mProcessCrashTimes.remove(app.info.processName, app.info.uid); app.removed = true; removeProcessLocked(app, false); + mMainStack.resumeTopActivityLocked(null); return false; } + mMainStack.resumeTopActivityLocked(null); } else { ActivityRecord r = mMainStack.topRunningActivityLocked(null); if (r.app == app) { @@ -6789,7 +6791,7 @@ public final class ActivityManagerService extends ActivityManagerNative * @param crashInfo describing the exception */ public void handleApplicationCrash(IBinder app, ApplicationErrorReport.CrashInfo crashInfo) { - ProcessRecord r = findAppProcess(app); + ProcessRecord r = findAppProcess(app, "Crash"); EventLog.writeEvent(EventLogTags.AM_CRASH, Binder.getCallingPid(), app == null ? "system" : (r == null ? "unknown" : r.processName), @@ -6808,7 +6810,10 @@ public final class ActivityManagerService extends ActivityManagerNative IBinder app, int violationMask, StrictMode.ViolationInfo info) { - ProcessRecord r = findAppProcess(app); + ProcessRecord r = findAppProcess(app, "StrictMode"); + if (r == null) { + return; + } if ((violationMask & StrictMode.PENALTY_DROPBOX) != 0) { Integer stackFingerprint = info.hashCode(); @@ -6982,7 +6987,7 @@ public final class ActivityManagerService extends ActivityManagerNative */ public boolean handleApplicationWtf(IBinder app, String tag, ApplicationErrorReport.CrashInfo crashInfo) { - ProcessRecord r = findAppProcess(app); + ProcessRecord r = findAppProcess(app, "WTF"); EventLog.writeEvent(EventLogTags.AM_WTF, Binder.getCallingPid(), app == null ? "system" : (r == null ? "unknown" : r.processName), @@ -7004,7 +7009,7 @@ public final class ActivityManagerService extends ActivityManagerNative * @param app object of some object (as stored in {@link com.android.internal.os.RuntimeInit}) * @return the corresponding {@link ProcessRecord} object, or null if none could be found */ - private ProcessRecord findAppProcess(IBinder app) { + private ProcessRecord findAppProcess(IBinder app, String reason) { if (app == null) { return null; } @@ -7020,7 +7025,9 @@ public final class ActivityManagerService extends ActivityManagerNative } } - Slog.w(TAG, "Can't find mystery application: " + app); + Slog.w(TAG, "Can't find mystery application for " + reason + + " from pid=" + Binder.getCallingPid() + + " uid=" + Binder.getCallingUid() + ": " + app); return null; } } |