From 9a7bd8477f7024764c9b121fe91df0fec38eae87 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Fri, 12 Jun 2020 08:28:33 -0400 Subject: [PATCH] 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 --- .../controls/controller/ControlsProviderLifecycleManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt index ec8bfc6fa2ae0..977e46ac3b446 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt @@ -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 {