Controls - Reduce binding priority

Discussions with framework team led to addition of the
BIND_NOT_PERCEPTIBLE flag, which will help release the service when
the system is under memory pressure.

Fixes: 158771014
Test: manual
Change-Id: I58b25dd23dba88fbd9e5f9e3ad0a052cccd39d21
(cherry picked from commit 9a7bd8477f)
This commit is contained in:
Matt Pietal
2020-06-12 08:28:33 -04:00
parent 160db07b3b
commit 72235982a9

View File

@@ -76,7 +76,8 @@ class ControlsProviderLifecycleManager(
private const val LOAD_TIMEOUT_SECONDS = 20L // seconds
private const val MAX_BIND_RETRIES = 5
private const val DEBUG = true
private val BIND_FLAGS = Context.BIND_AUTO_CREATE or Context.BIND_FOREGROUND_SERVICE
private val BIND_FLAGS = Context.BIND_AUTO_CREATE or Context.BIND_FOREGROUND_SERVICE or
Context.BIND_NOT_PERCEPTIBLE
}
private val intent = Intent().apply {