Merge "Hold WM lock when add starting window to TaskOrganizer" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5ddb3b7aeb
@@ -2176,7 +2176,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Add starting %s: startingData=%s",
|
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Add starting %s: startingData=%s",
|
||||||
this, startingData);
|
this, startingData);
|
||||||
|
|
||||||
|
|
||||||
WindowManagerPolicy.StartingSurface surface = null;
|
WindowManagerPolicy.StartingSurface surface = null;
|
||||||
try {
|
try {
|
||||||
surface = startingData.createStartingSurface(ActivityRecord.this);
|
surface = startingData.createStartingSurface(ActivityRecord.this);
|
||||||
|
|||||||
@@ -58,10 +58,12 @@ public class StartingSurfaceController {
|
|||||||
overrideConfig, displayId);
|
overrideConfig, displayId);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Task task = activity.getTask();
|
synchronized (mService.mGlobalLock) {
|
||||||
if (task != null && mService.mAtmService.mTaskOrganizerController.addStartingWindow(task,
|
final Task task = activity.getTask();
|
||||||
activity.token, theme)) {
|
if (task != null && mService.mAtmService.mTaskOrganizerController.addStartingWindow(
|
||||||
return new ShellStartingSurface(task);
|
task, activity.token, theme)) {
|
||||||
|
return new ShellStartingSurface(task);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -124,14 +126,13 @@ public class StartingSurfaceController {
|
|||||||
activity.mDisplayContent.handleTopActivityLaunchingInDifferentOrientation(
|
activity.mDisplayContent.handleTopActivityLaunchingInDifferentOrientation(
|
||||||
topFullscreenActivity, false /* checkOpening */);
|
topFullscreenActivity, false /* checkOpening */);
|
||||||
}
|
}
|
||||||
|
if (DEBUG_ENABLE_SHELL_DRAWER) {
|
||||||
|
mService.mAtmService.mTaskOrganizerController.addStartingWindow(task,
|
||||||
|
activity.token, 0 /* launchTheme */);
|
||||||
|
return new ShellStartingSurface(task);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!DEBUG_ENABLE_SHELL_DRAWER) {
|
return mService.mTaskSnapshotController.createStartingSurface(activity, taskSnapshot);
|
||||||
return mService.mTaskSnapshotController
|
|
||||||
.createStartingSurface(activity, taskSnapshot);
|
|
||||||
}
|
|
||||||
mService.mAtmService.mTaskOrganizerController.addStartingWindow(task, activity.token,
|
|
||||||
0 /* launchTheme */);
|
|
||||||
return new ShellStartingSurface(task);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -144,8 +145,9 @@ public class StartingSurfaceController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(boolean animate) {
|
public void remove(boolean animate) {
|
||||||
mService.mAtmService.mTaskOrganizerController.removeStartingWindow(mTask,
|
synchronized (mService.mGlobalLock) {
|
||||||
animate);
|
mService.mAtmService.mTaskOrganizerController.removeStartingWindow(mTask, animate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user