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

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

Frameworks: QS performance profiles tile



Patchset 2: Fix not null comparation
Patchset 3: xxhdpi drawables
Patchset 4: Fix xxhdpi drawables (thx blunden)
            Rebased
Patchset 5: Add suggestions
            Sync on boot the system property with the setting
Patchset 6: Rebased

Conflicts:
	core/java/com/android/internal/util/cm/QSUtils.java
	core/res/res/values-cs/cm_strings.xml
	core/res/res/values-el/cm_strings.xml
	core/res/res/values-hu/cm_strings.xml
	core/res/res/values/cm_strings.xml
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
	packages/SystemUI/res/drawable-hdpi/ic_qs_perf_profile.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_perf_profile_bal.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_perf_profile_perf.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_perf_profile_pwrsv.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_perf_profile.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_perf_profile_bal.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_perf_profile_perf.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_perf_profile_pwrsv.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_perf_profile.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_perf_profile_bal.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_perf_profile_perf.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_perf_profile_pwrsv.png
	packages/SystemUI/res/drawable-xxhdpi/ic_qs_perf_profile.png
	packages/SystemUI/res/drawable-xxhdpi/ic_qs_perf_profile_bal.png
	packages/SystemUI/res/drawable-xxhdpi/ic_qs_perf_profile_perf.png
	packages/SystemUI/res/drawable-xxhdpi/ic_qs_perf_profile_pwrsv.png
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
	services/java/com/android/server/SystemServer.java

Change-Id: Ib32d3734b63f88a3473e0ab10d8edf30dae9ceb6
Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
parent 1dfd0170
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -3298,6 +3298,13 @@ public final class Settings {
         */
         */
        public static final String UI_FORCE_OVERFLOW_BUTTON = "ui_force_overflow_button";
        public static final String UI_FORCE_OVERFLOW_BUTTON = "ui_force_overflow_button";


        /**
         * Performance profile
         * @see config_perf_profile_prop in frameworks/base/core/res/res/values/config.xml
         * @hide
         */
        public static final String PERFORMANCE_PROFILE = "performance_profile";

        /**
        /**
         * Settings to backup. This is here so that it's in the same place as the settings
         * Settings to backup. This is here so that it's in the same place as the settings
         * keys and easy to update.
         * keys and easy to update.
+2 −3
Original line number Original line Diff line number Diff line
@@ -48,11 +48,10 @@ public class QSUtils {
        }
        }


        public static boolean deviceSupportsPerformanceProfiles(Context ctx) {
        public static boolean deviceSupportsPerformanceProfiles(Context ctx) {
            /*Resources res = ctx.getResources();
            Resources res = ctx.getResources();
            String perfProfileProp = res.getString(
            String perfProfileProp = res.getString(
                    com.android.internal.R.string.config_perf_profile_prop);
                    com.android.internal.R.string.config_perf_profile_prop);
            return !TextUtils.isEmpty(perfProfileProp);*/
            return !TextUtils.isEmpty(perfProfileProp);
		return false;
        }
        }


        public static boolean expandedDesktopEnabled(ContentResolver resolver) {
        public static boolean expandedDesktopEnabled(ContentResolver resolver) {
+4 −0
Original line number Original line Diff line number Diff line
@@ -62,4 +62,8 @@


    <string name="permlab_interceptSmsSent">zachytit odchozí SMS</string>
    <string name="permlab_interceptSmsSent">zachytit odchozí SMS</string>
    <string name="permdesc_interceptSmsSent">Umožní odchytit odchozí SMS. Škodlivé aplikace mohou pomocí odchycení SMS zabránit její odeslání příjemci.</string>
    <string name="permdesc_interceptSmsSent">Umožní odchytit odchozí SMS. Škodlivé aplikace mohou pomocí odchycení SMS zabránit její odeslání příjemci.</string>

    <string name="perf_profile_pwrsv">Úsporný</string>
    <string name="perf_profile_bal">Vyvážený</string>
    <string name="perf_profile_perf">Výkonný</string>
</resources>
</resources>
+3 −0
Original line number Original line Diff line number Diff line
@@ -71,4 +71,7 @@
    <string name="policydesc_enforceSelinux">Ermöglicht der App, die Anwendung der SELinux-Richtlinie zwischen strikt und moderat zu wechseln.</string>
    <string name="policydesc_enforceSelinux">Ermöglicht der App, die Anwendung der SELinux-Richtlinie zwischen strikt und moderat zu wechseln.</string>
    <string name="policylab_enforceMmac">MMAC-Richtlinie wechseln</string>
    <string name="policylab_enforceMmac">MMAC-Richtlinie wechseln</string>
    <string name="policydesc_enforceMmac">Ermöglicht der App, die Anwendung der MMAC-Richtlinie zwischen strikt und moderat zu wechseln.</string>
    <string name="policydesc_enforceMmac">Ermöglicht der App, die Anwendung der MMAC-Richtlinie zwischen strikt und moderat zu wechseln.</string>
    <string name="perf_profile_pwrsv">Energie sparen</string>
    <string name="perf_profile_bal">Ausgeglichen</string>
    <string name="perf_profile_perf">Mehr Leistung</string>
</resources>
</resources>
+3 −0
Original line number Original line Diff line number Diff line
@@ -121,4 +121,7 @@
    <string name="policydesc_enforceSelinux">Εναλλαγή πολιτικής SELinux σε εξαναγκασμένη ή επιτρεπόμενη.</string>
    <string name="policydesc_enforceSelinux">Εναλλαγή πολιτικής SELinux σε εξαναγκασμένη ή επιτρεπόμενη.</string>
    <string name="policylab_enforceMmac">Εξαναγκασμός MMAC</string>
    <string name="policylab_enforceMmac">Εξαναγκασμός MMAC</string>
    <string name="policydesc_enforceMmac">Εναλλαγή πολιτικής MMAC σε εξαναγκασμένη ή επιτρεπόμενη.</string>
    <string name="policydesc_enforceMmac">Εναλλαγή πολιτικής MMAC σε εξαναγκασμένη ή επιτρεπόμενη.</string>
    <string name="perf_profile_pwrsv">Εξοικονόμηση ενέργειας</string>
    <string name="perf_profile_bal">Ισορροπημένο</string>
    <string name="perf_profile_perf">Επιδόσεις</string>
</resources>
</resources>
Loading