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

Commit 7d960039 authored by Lucas Silva's avatar Lucas Silva Committed by Android (Google) Code Review
Browse files

Merge "Allow activities to be embedded within the dream" into main

parents 6ef08d0c deb58d3e
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIV
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RTL;
import static android.provider.Settings.Global.HIDE_ERROR_DIALOGS;
import static android.provider.Settings.System.FONT_SCALE;
import static android.service.controls.flags.Flags.homePanelDream;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.WindowManager.TRANSIT_CHANGE;
@@ -1501,14 +1502,19 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        a.exported = true;
        a.name = DreamActivity.class.getName();
        a.enabled = true;
        a.launchMode = ActivityInfo.LAUNCH_SINGLE_INSTANCE;
        a.persistableMode = ActivityInfo.PERSIST_NEVER;
        a.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
        a.colorMode = ActivityInfo.COLOR_MODE_DEFAULT;
        a.flags |= ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS;
        a.resizeMode = RESIZE_MODE_UNRESIZEABLE;
        a.configChanges = 0xffffffff;

        if (homePanelDream()) {
            a.launchMode = ActivityInfo.LAUNCH_SINGLE_TASK;
        } else {
            a.resizeMode = RESIZE_MODE_UNRESIZEABLE;
            a.launchMode = ActivityInfo.LAUNCH_SINGLE_INSTANCE;
        }

        final ActivityOptions options = ActivityOptions.makeBasic();
        options.setLaunchActivityType(ACTIVITY_TYPE_DREAM);