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

Commit 505f89bc authored by Steve Kondik's avatar Steve Kondik Committed by Brint E. Kriebel
Browse files

perf: Don't persist the perf profile across a reboot

 * Always initialize with the default performance profile.
 * There are a lot of reasons for this, but mostly because
   users are stumbling into the setting and ending up with a
   slow system because they enabled powersave mode.

Change-Id: Icd0a1ddcc41700eb29a126bda1eb67a26fc2d5dd
parent 1d24874e
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -71,17 +71,14 @@ class PerformanceManager {
                           !TextUtils.isEmpty(mPerfProfileProperty);

        if (mProfilesEnabled) {
            mCurrentProfile = Settings.System.getString(context.getContentResolver(),
                    Settings.Secure.PERFORMANCE_PROFILE);
            if (mCurrentProfile == null) {
                mCurrentProfile = mPerfProfileDefault;
            }

            // Magic value- this will use a power hint instead of relying on
            // a property trigger via init. This will become the default
            // after devices have been updated.
            mUsePowerHAL = "powerhal".equals(mPerfProfileProperty);
            selectProfile(mCurrentProfile);

            // Reset the stored value to the default profile when we are initialized.
            // We currently do not want to support booting in perf or powersave modes.
            setPowerProfileLocked(mPerfProfileDefault);
        }
    }