OSDN Git Service

OOM-adjust an app to the foreground for startForegroundService
authorChristopher Tate <ctate@google.com>
Thu, 20 Apr 2017 21:48:13 +0000 (14:48 -0700)
committerChristopher Tate <ctate@google.com>
Thu, 20 Apr 2017 22:15:37 +0000 (15:15 -0700)
commite23fa2bc8af631b91dff573b6e2411257fa15934
treedb392c8b7c9f9ef7a636039f0db9ca62ef700ea2
parent106527e21e63a6c5b8f4b1dc6dcb608bdff98d27
OOM-adjust an app to the foreground for startForegroundService

That is, OOM adjust it appropriately when the service is kicked off.
Previously it was mistakenly not recognizing the foreground intention
at the OOM level until the service called startForeground(), so there
was a period of inappropriate OOM vulnerability.

Bug 36990485
Test: manual

Change-Id: Ic9b56ef29d5120bf7912681900e9ebaeb0abc5d6
services/core/java/com/android/server/am/ActiveServices.java