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

Commit 9fdd66bd authored by Karthik Parsha's avatar Karthik Parsha Committed by Giulio Cervera
Browse files

DMM Service: Offline Memory only if DMM is enabled.

Add a check to see if DMM is enabled before the request to turn off unstable
memory.
parent cda31b48
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -162,8 +162,8 @@ class DynamicMemoryManagerService {

    private int dpdEnabled() {
        if (DEBUG) Log.w(TAG, "DPD Enabled: " +
                SystemProperties.getInt("persist.sys.dpd", 1));
        return SystemProperties.getInt("persist.sys.dpd", 1);
                SystemProperties.getInt("persist.sys.dpd", 0));
        return SystemProperties.getInt("persist.sys.dpd", 0);
    }

    private boolean setStartAlarm() {
@@ -308,7 +308,7 @@ class DynamicMemoryManagerService {
                        mState = DMM_MEM_STATE.ACTIVE;
                }
            } else {
                if(mState == DMM_MEM_STATE.ACTIVE) {
                if((mState == DMM_MEM_STATE.ACTIVE) && (dpdEnabled() == 1)) {
                    if(Power.SetUnstableMemoryState(flag) < 0)
                        Log.e(TAG, "Disabling Unstable Memory: Failed !");
                    else