Preserve windows when resizing tasks

If the activity doesn't handle a configuration change and needs to be
relaunched, preserve the windows to prevent a flicker.

Test: resize in split screen and observe there is no flicker
Fixes: 153583483
Change-Id: Ibe71035da9eb2bd9dca270e7eca8e47afbffcb78
This commit is contained in:
Vishnu Nair
2020-04-10 08:55:25 -07:00
parent dedd760e36
commit 40b4afb004

View File

@@ -156,7 +156,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
final PooledConsumer f = PooledLambda.obtainConsumer(
ActivityRecord::ensureActivityConfiguration,
PooledLambda.__(ActivityRecord.class), 0,
false /* preserveWindow */);
true /* preserveWindow */);
try {
for (int i = haveConfigChanges.size() - 1; i >= 0; --i) {
haveConfigChanges.valueAt(i).forAllActivities(f);