Finish crashed activities immediately

By finishing crashed activities right away the VirtualDisplays
associated with ActivityView are removed immediately rather than
being deferred. Also there is no waiting for Pause (0.5 sec) and
Destroy (10 sec) timeouts to expire.

Fixes bug 15092354.

Change-Id: Ie4941cb19dcc6f6fc61b2475162ea2794c9558a2
This commit is contained in:
Craig Mautner
2014-07-24 13:32:37 -07:00
parent 472e234d80
commit 8e5b133bf6

View File

@@ -3579,7 +3579,9 @@ final class ActivityStack {
if (r.app == app) {
Slog.w(TAG, " Force finishing activity "
+ r.intent.getComponent().flattenToShortString());
finishActivityLocked(r, Activity.RESULT_CANCELED, null, "crashed", false);
// Force the destroy to skip right to removal.
r.app = null;
finishCurrentActivityLocked(r, FINISH_IMMEDIATELY, false);
}
}
}