Merge "Attemp to fix an NPE while transferStartingWindow."
This commit is contained in:
committed by
Android (Google) Code Review
commit
b7aebde138
@@ -4007,6 +4007,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
private boolean transferStartingWindow(@NonNull ActivityRecord fromActivity) {
|
||||
final WindowState tStartingWindow = fromActivity.mStartingWindow;
|
||||
if (tStartingWindow != null && fromActivity.mStartingSurface != null) {
|
||||
if (tStartingWindow.getParent() == null) {
|
||||
// The window has been detached from the parent, so the window cannot be transfer
|
||||
// to another activity because it may be in the remove process.
|
||||
// Don't need to remove the starting window at this point because that will happen
|
||||
// at #postWindowRemoveCleanupLocked
|
||||
return false;
|
||||
}
|
||||
// In this case, the starting icon has already been displayed, so start
|
||||
// letting windows get shown immediately without any more transitions.
|
||||
if (fromActivity.mVisible) {
|
||||
|
||||
Reference in New Issue
Block a user