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

Commit 8a96d5d1 authored by Jorge Ruesga's avatar Jorge Ruesga Committed by Gerrit Code Review
Browse files

QS: Add dock battery tile (1/2)



Add a dinamic tile for devices with dock battery

Patchset 2: New icon set
            Rebased

Change-Id: I5e0e84da0b0f248fa9eb568c5d506b00cf3998b0
Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
parent 2e939f9d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2576,6 +2576,13 @@ public final class Settings {
         */
        public static final String QS_DYNAMIC_USBTETHER = "qs_dyanmic_usbtether";

        /**
         * Quick Settings Panel Dynamic Tiles
         *
         * @hide
         */
        public static final String QS_DYNAMIC_DOCK_BATTERY = "qs_dyanmic_dock_battery";

        /**
         * Quick Settings Panel Dynamic Tiles
         *
+5 −0
Original line number Diff line number Diff line
@@ -51,4 +51,9 @@ public class QSUtils {
            final TelephonyManager tm = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);
            return (tm.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE) || tm.getLteOnGsmMode() != 0;
        }

        public static boolean deviceSupportsDockBattery(Context ctx) {
            Resources res = ctx.getResources();
            return res.getBoolean(com.android.internal.R.bool.config_hasDockBattery);
        }
}
+977 B
Loading image diff...
+718 B
Loading image diff...
+891 B
Loading image diff...
Loading