Merge "Prevent NPE while finishing activity" into rvc-dev am: 1dbee3e34b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11788494 Change-Id: Ia0f5dfb2c7495c892cb9bfa3da06dd5592994a07
This commit is contained in:
@@ -1685,6 +1685,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
final NeededUriGrants resultGrants = collectGrants(resultData, r.resultTo);
|
||||
|
||||
synchronized (mGlobalLock) {
|
||||
// Sanity check in case activity was removed before entering global lock.
|
||||
if (!r.isInHistory()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Keep track of the root activity of the task before we finish it
|
||||
final Task tr = r.getTask();
|
||||
final ActivityRecord rootR = tr.getRootActivity();
|
||||
|
||||
Reference in New Issue
Block a user