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

Commit e1a196a2 authored by Danesh M's avatar Danesh M
Browse files

PowerUsage : Don't update if profile didn't change

CYNGNOS-786

Change-Id: I4eb47e5f206f9723b7d003ccfac484e377bf7afd
parent 8fd9afd7
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -234,9 +234,12 @@ public class PowerUsageSummary extends PowerUsageBase
    public boolean onPreferenceChange(Preference preference, Object newValue) {
        if (newValue != null) {
            if (preference == mPerfProfilePref) {
                mPerf.setPowerProfile(Integer.valueOf((String)(newValue)));
                Integer value = Integer.valueOf((String) (newValue));
                boolean powerProfileUpdated = mPerf.setPowerProfile(value);
                if (powerProfileUpdated) {
                    updatePerformanceSummary();
                return true;
                }
                return powerProfileUpdated;
            }
        }
        return false;