Add BIND_INCLUDE_CAPABILITIES flags to SystemCaptionsManagerService

When system process binds to SystemCaptionsManagerService, add BIND_INCLUDE_CAPABILITIES

Bug: 153144383
Test: adb shell dumpsys activity -a, observe com.google.android.as
process has capability 7.

Change-Id: I3284ac60a3032c68b378570ceb20129916445596
This commit is contained in:
Hui Yu
2020-04-03 13:52:40 -07:00
parent d6503d5cfd
commit 4fca9fc778

View File

@@ -108,7 +108,8 @@ final class RemoteSystemCaptionsManagerService {
}
mBinding = true;
int flags = Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE;
int flags = Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE
| Context.BIND_INCLUDE_CAPABILITIES;
boolean willBind = mContext.bindServiceAsUser(mIntent, mServiceConnection, flags,
mHandler, new UserHandle(mUserId));
if (!willBind) {