Skip to content

Commit b7eea9d

Browse files
committed
Allow optional Mms app lock in memory in addition to service check
Change-Id: Ie2cc5d79163c213bf36e0e9917caa32bc298ffe3
1 parent c08659a commit b7eea9d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11620,9 +11620,12 @@ private final int computeOomAdjLocked(ProcessRecord app, int hiddenAdj,
1162011620
int adj;
1162111621
int schedGroup;
1162211622
int N;
11623-
if (app.processName.equals("com.android.mms") && app.services.size() != 0 ) {
11623+
if (app.processName.equals("com.android.mms") && (app.services.size() != 0
11624+
|| Settings.System.getInt(mContext.getContentResolver(),
11625+
Settings.System.LOCK_MMS_IN_MEMORY, 1) == 1)) {
1162411626
// When SmsReceiverService is running, it does important work. So treat
1162511627
// Mms app as being in the foreground to prevent loss of messsages.
11628+
// Or optionally lock the Mms app in memory all the time.
1162611629
adj = FOREGROUND_APP_ADJ;
1162711630
schedGroup = Process.THREAD_GROUP_DEFAULT;
1162811631
app.adjType = "sms-service";

0 commit comments

Comments
 (0)