Revert "Remove BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS for ConnectionService bind."
This reverts commit 53fad3df37f57a09eeb1b28cfbecde815ad9b4d1.
Reason for revert: Patch impacts apps negatively.
Bug: 168211626
Change-Id: I66f7256443ea839fe2d3d735f100022ef117c4dd
(cherry picked from commit 6bdb30ff55f89c3ed00004606962615b4046042a)
Merged-In:I66f7256443ea839fe2d3d735f100022ef117c4dd
diff --git a/src/com/android/server/telecom/ServiceBinder.java b/src/com/android/server/telecom/ServiceBinder.java
index 2fcd2f5..aa2e2a2 100644
--- a/src/com/android/server/telecom/ServiceBinder.java
+++ b/src/com/android/server/telecom/ServiceBinder.java
@@ -87,7 +87,8 @@
ServiceConnection connection = new ServiceBinderConnection(call);
Log.addEvent(call, LogUtils.Events.BIND_CS, mComponentName);
- final int bindingFlags = Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE;
+ final int bindingFlags = Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE
+ | Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS;
final boolean isBound;
if (mUserHandle != null) {
isBound = mContext.bindServiceAsUser(serviceIntent, connection, bindingFlags,