Forwards onConfigurationChanged for PiP on reparenting
This fixes a regression caused by ag/5656236 PiP saves its last position on screen within AppWindowToken.onConfigurationChanged callback, which is triggered by Task.reparent before the task leaves pinned stack. With ag/5656236, Task.reparent no longer triggers AppWindowToken.onConfigurationChanged and instead, the latter will be called when the task is added back to its original stack while the pinned stack no longer exists. Bug: 142504739 Test: atest PinnedStackTests#testEnterPictureInPictureSavePosition Change-Id: I247a9da3113077031b442740445d836b0c176986
This commit is contained in:
@@ -121,8 +121,11 @@ class Task extends WindowContainer<AppWindowToken> implements ConfigurationConta
|
||||
// TODO: Remove after unification.
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newParentConfig) {
|
||||
// Only forward configuration changes in cases where children won't get it from TaskRecord.
|
||||
onConfigurationChanged(newParentConfig, mTaskRecord == null /*forwardToChildren*/);
|
||||
// Forward configuration changes in cases
|
||||
// - children won't get it from TaskRecord
|
||||
// - it's a pinned task
|
||||
onConfigurationChanged(newParentConfig,
|
||||
(mTaskRecord == null) || inPinnedWindowingMode() /*forwardToChildren*/);
|
||||
}
|
||||
|
||||
Task(int taskId, TaskStack stack, int userId, WindowManagerService service, int resizeMode,
|
||||
|
||||
Reference in New Issue
Block a user