Add BIND_WAIVE_PRIORITY for TileService

Fixes: 135148304
Test: build
Test: Grayscale tile works
Test: TileService is re-bound after "adb shell am force-stop"
Test: atest TileLifecycleManagerTest
Change-Id: Ib102cc9bd669acedf627960a2819fe8bc615b84b
This commit is contained in:
Fabian Kozynski
2019-07-01 12:50:03 -04:00
parent c1a2db2320
commit ff888daf91

View File

@@ -159,8 +159,11 @@ public class TileLifecycleManager extends BroadcastReceiver implements
mBindTryCount++;
try {
mIsBound = mContext.bindServiceAsUser(mIntent, this,
Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE
| Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS, mUser);
Context.BIND_AUTO_CREATE
| Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE
| Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS
| Context.BIND_WAIVE_PRIORITY,
mUser);
} catch (SecurityException e) {
Log.e(TAG, "Failed to bind to service", e);
mIsBound = false;