Don't inflate mSplitDecorManager in sync transaction callback
The current code inflates the UI in the sync transaction callback. This can result in a deadlock since inflate could block waiting on RT. The RT could be blocked waiting for the sync transaction to get applied to free up a buffer. But since the sync transaction won't get applied until after the inflate, it would deadlock. Test: Not stuck in split Fixes: 231929473 Change-Id: I751aa2d68ec96f7f77ba4145d810cccf764075ea
This commit is contained in:
@@ -224,14 +224,12 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
if (mRootTaskInfo.taskId == taskInfo.taskId) {
|
||||
// Inflates split decor view only when the root task is visible.
|
||||
if (mRootTaskInfo.isVisible != taskInfo.isVisible) {
|
||||
mSyncQueue.runInSync(t -> {
|
||||
if (taskInfo.isVisible) {
|
||||
mSplitDecorManager.inflate(mContext, mRootLeash,
|
||||
taskInfo.configuration.windowConfiguration.getBounds());
|
||||
} else {
|
||||
mSplitDecorManager.release(t);
|
||||
}
|
||||
});
|
||||
if (taskInfo.isVisible) {
|
||||
mSplitDecorManager.inflate(mContext, mRootLeash,
|
||||
taskInfo.configuration.windowConfiguration.getBounds());
|
||||
} else {
|
||||
mSyncQueue.runInSync(t -> mSplitDecorManager.release(t));
|
||||
}
|
||||
}
|
||||
mRootTaskInfo = taskInfo;
|
||||
} else if (taskInfo.parentTaskId == mRootTaskInfo.taskId) {
|
||||
|
||||
Reference in New Issue
Block a user