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

Commit d359088b authored by Wang Han's avatar Wang Han Committed by Bruno Martins
Browse files

TunerServiceImpl: Prevent Lineage keys from tuner reset

 * This way, we don't need to update tuner blacklist.

Change-Id: I8d8b356b4a8699483c158610e82f67c0fba652e1
parent 71c85387
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -164,6 +164,10 @@ public class TunerServiceImpl extends TunerService {
        setValue(TUNER_VERSION, newVersion);
    }

    private boolean isLineageSetting(String key) {
        return isLineageGlobal(key) || isLineageSystem(key) || isLineageSecure(key);
    }

    private boolean isLineageGlobal(String key) {
        return key.startsWith("lineageglobal:");
    }
@@ -370,7 +374,7 @@ public class TunerServiceImpl extends TunerService {
        mContext.sendBroadcast(intent);

        for (String key : mTunableLookup.keySet()) {
            if (ArrayUtils.contains(RESET_BLACKLIST, key)) {
            if (ArrayUtils.contains(RESET_BLACKLIST, key) || isLineageSetting(key)) {
                continue;
            }
            setValue(key, null);