summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jing Ji <jji@google.com> 2020-01-06 20:58:56 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-01-06 20:58:56 +0000
commit7ee21abb8f67e0119c03e5bfec7cbcbe49236b16 (patch)
treec088780ff406a0be7bacad32fdcaa31a03d339ef
parentfc2e27a3135b64e1b3e76ed62b7d20edc4f317bf (diff)
parentcc6e1394e91d6f1c6da9d3380a9ce85593855901 (diff)
Merge "Clamp the new oom adj to perceptible if the important caller requests"
-rw-r--r--services/core/java/com/android/server/am/OomAdjuster.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index 12f46569bd20..0fc885a2e61f 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -1541,12 +1541,12 @@ public final class OomAdjuster {
trackedProcState = true;
}
} else if ((cr.flags & Context.BIND_NOT_PERCEPTIBLE) != 0
- && clientAdj < ProcessList.PERCEPTIBLE_APP_ADJ
- && adj > ProcessList.PERCEPTIBLE_LOW_APP_ADJ) {
+ && clientAdj <= ProcessList.PERCEPTIBLE_APP_ADJ
+ && adj >= ProcessList.PERCEPTIBLE_LOW_APP_ADJ) {
newAdj = ProcessList.PERCEPTIBLE_LOW_APP_ADJ;
} else if ((cr.flags&Context.BIND_NOT_VISIBLE) != 0
&& clientAdj < ProcessList.PERCEPTIBLE_APP_ADJ
- && adj > ProcessList.PERCEPTIBLE_APP_ADJ) {
+ && adj >= ProcessList.PERCEPTIBLE_APP_ADJ) {
newAdj = ProcessList.PERCEPTIBLE_APP_ADJ;
} else if (clientAdj >= ProcessList.PERCEPTIBLE_APP_ADJ) {
newAdj = clientAdj;