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

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

base: cache power profiles support



Change-Id: Ica38e88cac7595862a83c9d06e0409e0afa85046
Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
parent b9075942
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -399,6 +399,7 @@ public final class PowerManager {
    final Context mContext;
    final IPowerManager mService;
    final Handler mHandler;
    private final boolean mHasPowerProfilesSupport;

    /**
     * {@hide}
@@ -407,6 +408,10 @@ public final class PowerManager {
        mContext = context;
        mService = service;
        mHandler = handler;

        mHasPowerProfilesSupport = !TextUtils.isEmpty(getDefaultPowerProfile()) &&
                !TextUtils.isEmpty(mContext.getResources().getString(
                        com.android.internal.R.string.config_perf_profile_prop));
    }

    /**
@@ -936,9 +941,7 @@ public final class PowerManager {
     * @hide
     */
    public boolean hasPowerProfiles() {
        return !TextUtils.isEmpty(getDefaultPowerProfile()) &&
               !TextUtils.isEmpty(mContext.getResources().getString(
                       com.android.internal.R.string.config_perf_profile_prop));
        return mHasPowerProfilesSupport;
    }

    /**