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

Commit 82289c1e authored by Bhargav Upperla's avatar Bhargav Upperla Committed by Steve Kondik
Browse files

Reduce total number of background apps for low memory devices

Due to memory constraints, we anyway cannot fit the default number
of BG apps. So instead of killing background apps to
free up memory when launching, start with an already
reduced background set of apps.
Another side-effect is that launch latencies also improve.

Change-Id: I3ae54aa7d53ff1b81252212973646a95d2d82e8a
Note: This is for low memory devices. (~512MB RAM or less)
parent 9abc998f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import com.android.server.wm.WindowManagerService;
import android.graphics.Point;
import android.util.Slog;
import android.view.Display;
import android.os.SystemProperties;

/**
 * Activity manager code dealing with processes.
@@ -101,7 +102,7 @@ class ProcessList {
    // The maximum number of hidden processes we will keep around before
    // killing them; this is just a control to not let us go too crazy with
    // keeping around processes on devices with large amounts of RAM.
    static final int MAX_HIDDEN_APPS = 24;
    static final int MAX_HIDDEN_APPS = SystemProperties.getInt("ro.sys.fw.bg_apps_limit", 24);

    // We allow empty processes to stick around for at most 30 minutes.
    static final long MAX_EMPTY_TIME = 30*60*1000;