From 998ef9a536e43339d14ae932e7116fe2a29faad9 Mon Sep 17 00:00:00 2001 From: Robert Horvath Date: Tue, 1 Nov 2022 14:21:47 +0000 Subject: Let DreamActivity handle all configuration changes On configuration changes such as screen orientation change, activities are usually recreated to reload resources. However, when DreamActivity is destroyed (also in the process of activity recreation) the dream is dismissed. To prevent this, DreamActivity was previously set to handle orientation change without activity recreation, but orientation changes often go along with screen size/layout changes, which still caused the DreamActivity to be recreated. This change lets DreamActivity handle all configuration changes without recreation, similar to how Window-based dreams used to work. Bug: 240892000 Merged-In: I345eb1d17ae88d893789dfcc160b4a9a664ba57f Change-Id: I4fdf0fe5f0bcd28b9af5cbe55f20760a3719da9c --- .../core/java/com/android/server/wm/ActivityTaskManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index 8d831d72c05b..91dcc8e412dc 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -1441,7 +1441,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { a.colorMode = ActivityInfo.COLOR_MODE_DEFAULT; a.flags |= ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS; a.resizeMode = RESIZE_MODE_UNRESIZEABLE; - a.configChanges = ActivityInfo.CONFIG_ORIENTATION; + a.configChanges = 0xffffffff; final ActivityOptions options = ActivityOptions.makeBasic(); options.setLaunchActivityType(ACTIVITY_TYPE_DREAM); -- cgit v1.2.3-59-g8ed1b