Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6449405 authored by Jerry Chang's avatar Jerry Chang
Browse files

Do not clear activity type in clearSizeCompatMode

The activity type was set when adding the activity to a task, so
reseting activity type in clearSizeCompatMode might leaving it undefined
because the activity is already added to a task.

Fix: 267559999
Test: atest SizeCompatTests
Change-Id: I611a5e98124937b7056b02cdedfe3884f99c3218
parent aeec8347
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -8035,7 +8035,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }

        // Clear config override in #updateCompatDisplayInsets().
        onRequestedOverrideConfigurationChanged(EMPTY);
        final int activityType = getActivityType();
        final Configuration overrideConfig = getRequestedOverrideConfiguration();
        overrideConfig.unset();
        // Keep the activity type which was set when attaching to a task to prevent leaving it
        // undefined.
        overrideConfig.windowConfiguration.setActivityType(activityType);
        onRequestedOverrideConfigurationChanged(overrideConfig);
    }

    @Override