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

Commit 6bcae26f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add DesktopModeStatus.enableMultipleDesktops()" into main

parents d0b8249b 8a316ddb
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -232,6 +232,16 @@ public class DesktopModeStatus {
        return DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_MODE.isTrue();
    }

    /**
     * Returns whether the multiple desktops feature is enabled for this device (both backend and
     * frontend implementations).
     */
    public static boolean enableMultipleDesktops(@NonNull Context context) {
        return Flags.enableMultipleDesktopsBackend()
                && Flags.enableMultipleDesktopsFrontend()
                && canEnterDesktopMode(context);
    }

    /**
     * @return {@code true} if this device is requesting to show the app handle despite non
     * necessarily enabling desktop mode