Loading apex/jobscheduler/service/java/com/android/server/job/JobServiceContext.java +4 −2 Original line number Diff line number Diff line Loading @@ -310,11 +310,13 @@ public final class JobServiceContext implements ServiceConnection { bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND | Context.BIND_ALMOST_PERCEPTIBLE | Context.BIND_BYPASS_POWER_NETWORK_RESTRICTIONS | Context.BIND_NOT_APP_COMPONENT_USAGE; | Context.BIND_NOT_APP_COMPONENT_USAGE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34; } else { bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND | Context.BIND_NOT_PERCEPTIBLE | Context.BIND_NOT_APP_COMPONENT_USAGE; | Context.BIND_NOT_APP_COMPONENT_USAGE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34; } binding = mContext.bindServiceAsUser(intent, this, bindFlags, UserHandle.of(job.getUserId())); Loading core/java/android/speech/tts/TextToSpeech.java +2 −1 Original line number Diff line number Diff line Loading @@ -2379,7 +2379,8 @@ public class TextToSpeech { boolean connect(String engine) { Intent intent = new Intent(Engine.INTENT_ACTION_TTS_SERVICE); intent.setPackage(engine); return mContext.bindService(intent, this, Context.BIND_AUTO_CREATE); return mContext.bindService(intent, this, Context.BIND_AUTO_CREATE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34); } @Override Loading services/core/java/com/android/server/content/SyncManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,8 @@ public class SyncManager { /** Flags used when connecting to a sync adapter service */ private static final int SYNC_ADAPTER_CONNECTION_FLAGS = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND | Context.BIND_ALLOW_OOM_MANAGEMENT; | Context.BIND_NOT_FOREGROUND | Context.BIND_ALLOW_OOM_MANAGEMENT | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34; /** Singleton instance. */ @GuardedBy("SyncManager.class") Loading services/core/java/com/android/server/media/MediaRoute2ProviderServiceProxy.java +2 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,8 @@ final class MediaRoute2ProviderServiceProxy extends MediaRoute2Provider service.setComponent(mComponentName); try { mBound = mContext.bindServiceAsUser(service, this, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34, new UserHandle(mUserId)); if (!mBound && DEBUG) { Slog.d(TAG, this + ": Bind failed"); Loading services/print/java/com/android/server/print/RemotePrintService.java +2 −1 Original line number Diff line number Diff line Loading @@ -572,7 +572,8 @@ final class RemotePrintService implements DeathRecipient { boolean wasBound = mContext.bindServiceAsUser(mIntent, mServiceConnection, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE | Context.BIND_INCLUDE_CAPABILITIES | Context.BIND_ALLOW_INSTANT, | Context.BIND_INCLUDE_CAPABILITIES | Context.BIND_ALLOW_INSTANT | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34, new UserHandle(mUserId)); if (!wasBound) { Loading Loading
apex/jobscheduler/service/java/com/android/server/job/JobServiceContext.java +4 −2 Original line number Diff line number Diff line Loading @@ -310,11 +310,13 @@ public final class JobServiceContext implements ServiceConnection { bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND | Context.BIND_ALMOST_PERCEPTIBLE | Context.BIND_BYPASS_POWER_NETWORK_RESTRICTIONS | Context.BIND_NOT_APP_COMPONENT_USAGE; | Context.BIND_NOT_APP_COMPONENT_USAGE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34; } else { bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND | Context.BIND_NOT_PERCEPTIBLE | Context.BIND_NOT_APP_COMPONENT_USAGE; | Context.BIND_NOT_APP_COMPONENT_USAGE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34; } binding = mContext.bindServiceAsUser(intent, this, bindFlags, UserHandle.of(job.getUserId())); Loading
core/java/android/speech/tts/TextToSpeech.java +2 −1 Original line number Diff line number Diff line Loading @@ -2379,7 +2379,8 @@ public class TextToSpeech { boolean connect(String engine) { Intent intent = new Intent(Engine.INTENT_ACTION_TTS_SERVICE); intent.setPackage(engine); return mContext.bindService(intent, this, Context.BIND_AUTO_CREATE); return mContext.bindService(intent, this, Context.BIND_AUTO_CREATE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34); } @Override Loading
services/core/java/com/android/server/content/SyncManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,8 @@ public class SyncManager { /** Flags used when connecting to a sync adapter service */ private static final int SYNC_ADAPTER_CONNECTION_FLAGS = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND | Context.BIND_ALLOW_OOM_MANAGEMENT; | Context.BIND_NOT_FOREGROUND | Context.BIND_ALLOW_OOM_MANAGEMENT | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34; /** Singleton instance. */ @GuardedBy("SyncManager.class") Loading
services/core/java/com/android/server/media/MediaRoute2ProviderServiceProxy.java +2 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,8 @@ final class MediaRoute2ProviderServiceProxy extends MediaRoute2Provider service.setComponent(mComponentName); try { mBound = mContext.bindServiceAsUser(service, this, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34, new UserHandle(mUserId)); if (!mBound && DEBUG) { Slog.d(TAG, this + ": Bind failed"); Loading
services/print/java/com/android/server/print/RemotePrintService.java +2 −1 Original line number Diff line number Diff line Loading @@ -572,7 +572,8 @@ final class RemotePrintService implements DeathRecipient { boolean wasBound = mContext.bindServiceAsUser(mIntent, mServiceConnection, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE | Context.BIND_INCLUDE_CAPABILITIES | Context.BIND_ALLOW_INSTANT, | Context.BIND_INCLUDE_CAPABILITIES | Context.BIND_ALLOW_INSTANT | Context.BIND_DENY_ACTIVITY_STARTS_PRE_34, new UserHandle(mUserId)); if (!wasBound) { Loading