From: Dianne Hackborn Date: Wed, 17 Apr 2019 21:18:18 +0000 (-0700) Subject: Work on issue #130684057: oom_adj scores for 1P apps are abnormally low X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d35237735183092627bbd843f9bd1083784268b3;p=android-x86%2Fframeworks-base.git Work on issue #130684057: oom_adj scores for 1P apps are abnormally low Also bind with BIND_NOT_VISIBLE from JobScheduler, so we don't raise the target's oom_adj in to the visible range. It isn't. Bug: 130684057 Test: manual Change-Id: I995fc74136941b064b625b59915a8e182de91221 --- diff --git a/services/core/java/com/android/server/job/JobServiceContext.java b/services/core/java/com/android/server/job/JobServiceContext.java index 8578bb78f80d..a349d875c1ff 100644 --- a/services/core/java/com/android/server/job/JobServiceContext.java +++ b/services/core/java/com/android/server/job/JobServiceContext.java @@ -248,7 +248,8 @@ public final class JobServiceContext implements ServiceConnection { scheduleOpTimeOutLocked(); final Intent intent = new Intent().setComponent(job.getServiceComponent()); boolean binding = mContext.bindServiceAsUser(intent, this, - Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND, + Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND + | Context.BIND_NOT_VISIBLE | Context.BIND_ADJUST_BELOW_PERCEPTIBLE, new UserHandle(job.getUserId())); if (!binding) { if (DEBUG) {