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

Commit a682282d authored by Bhargav Upperla's avatar Bhargav Upperla
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.
This change is for low memory devices. (512MB RAM or less)

Change-Id: I9de0cb1734c0a386fc47cde71723e5c16825f5a3
parent 98eb5425
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ final class ProcessList {
    // we have no limit on the number of service, visible, foreground, or other such
    // processes and the number of those processes does not count against the cached
    // process limit.
    static final int MAX_CACHED_APPS = 24;
    static final int MAX_CACHED_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;