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

Commit a0c3610e authored by Roman Birg's avatar Roman Birg Committed by Gerrit Code Review
Browse files

frameworks: set default expanded desktop style



On a fresh boot, a user can add an expanded desktop tile. They can also
add it to their power menu. But until they go into Display -> Expanded
desktop style and set it to something other than disabled, it won't show
up anywhere.

Since the user has to toggle expanded desktop, let's use a sensible
default and avoid the extra step.

Change-Id: I7fbe8c58d85d14c227d5e237260eee4181beafed
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 5076d46c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ public class QSUtils {

        public static boolean expandedDesktopEnabled(ContentResolver resolver) {
            return Settings.System.getIntForUser(resolver, Settings.System.EXPANDED_DESKTOP_STYLE,
                    0, UserHandle.USER_CURRENT_OR_SELF) != 0;
                    2, UserHandle.USER_CURRENT_OR_SELF) != 0;
        }

        public static boolean deviceSupportsNfc(Context ctx) {
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ public abstract class BaseStatusBar extends SystemUI implements
            if (Settings.System.getIntForUser(resolver,
                    Settings.System.EXPANDED_DESKTOP_STATE, 0, UserHandle.USER_CURRENT) != 0) {
                mExpandedDesktopStyle = Settings.System.getIntForUser(mContext.getContentResolver(),
                        Settings.System.EXPANDED_DESKTOP_STYLE, 0, UserHandle.USER_CURRENT);
                        Settings.System.EXPANDED_DESKTOP_STYLE, 2, UserHandle.USER_CURRENT);
            }
            final String dndString = Settings.System.getString(mContext.getContentResolver(),
                    Settings.System.HEADS_UP_CUSTOM_VALUES);
+1 −1
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
                Settings.System.getIntForUser(cr,
                        Settings.System.EXPANDED_DESKTOP_STYLE, 0, UserHandle.USER_CURRENT) != 0
                && Settings.System.getIntForUser(cr,
                        Settings.System.POWER_MENU_EXPANDED_DESKTOP_ENABLED, 0, UserHandle.USER_CURRENT) == 1;
                        Settings.System.POWER_MENU_EXPANDED_DESKTOP_ENABLED, 2, UserHandle.USER_CURRENT) == 1;

        if (showExpandedDesktop) {
            mItems.add(mExpandDesktopModeOn);