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

Commit d2393efe authored by xavihernandez's avatar xavihernandez Committed by Danny Baumann
Browse files

SystemUI: Add Expanded desktop tile to QuickSettings (2/2)

    * Patch Set 1: initial commit
    * Patch Set 2: change tile title
    * Patch Set 3: change tile title again
    * Patch Set 4: updated to suggested drawable by blunden
    * Patch Set 5: update drawables to fit to the bahavior of
                   the other icons used in QS
    * Patch Set 6: rebase
                   only display tile if feature is enabled
    * Patch Set 7: launch the proper long press activity
    * Patch Set 8: correctly hide tiles if ED or profiles are turned off
		   style fixes

Change-Id: I2273f8f0bdb726ec34f00a6fb205b1bc6e795cfa
parent b88dd214
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ public class QSConstants {
        public static final String TILE_USBTETHER = "toggleUsbTether";
        public static final String TILE_QUIETHOURS = "toggleQuietHours";
        public static final String TILE_VOLUME = "toggleVolume";
        public static final String TILE_EXPANDEDDESKTOP = "toggleExpandedDesktop";

        public static final String TILE_DELIMITER = "|";
        public static ArrayList<String> TILES_DEFAULT = new ArrayList<String>();
+6 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ import android.hardware.display.DisplayManager;
import android.hardware.display.WifiDisplayStatus;
import android.net.ConnectivityManager;
import android.nfc.NfcAdapter;
import android.os.UserHandle;
import android.provider.Settings;
import android.telephony.TelephonyManager;

@@ -43,6 +44,11 @@ public class QSUtils {
            return (Settings.System.getInt(resolver, Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1);
        }

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

        public static boolean deviceSupportsNfc(Context ctx) {
            return NfcAdapter.getDefaultAdapter(ctx) != null;
        }
+3.38 KiB
Loading image diff...
+3.78 KiB
Loading image diff...
+3.18 KiB
Loading image diff...
Loading