summaryrefslogtreecommitdiff
path: root/libs/binder/IAppOpsService.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2018-06-08 15:11:57 -0700
committer Xin Li <delphij@google.com> 2018-06-08 15:11:57 -0700
commitf11e2bd016d886a333345dea853ebda23a408d5c (patch)
tree905bd4d25d6ab2b046620ff459777d8dcfa5d7de /libs/binder/IAppOpsService.cpp
parentaabd6b7fa343654cd85b3b2da392e424d037d15a (diff)
parent5c947cdf72270fd1f766b2248d526ebc8c7227f6 (diff)
Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Bug: 79597307 Change-Id: I6d6bee71b9424eb478780bbfc06b830eb8ded342
Diffstat (limited to 'libs/binder/IAppOpsService.cpp')
-rw-r--r--libs/binder/IAppOpsService.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/binder/IAppOpsService.cpp b/libs/binder/IAppOpsService.cpp
index c38568c40f..068664b418 100644
--- a/libs/binder/IAppOpsService.cpp
+++ b/libs/binder/IAppOpsService.cpp
@@ -61,13 +61,14 @@ public:
}
virtual int32_t startOperation(const sp<IBinder>& token, int32_t code, int32_t uid,
- const String16& packageName) {
+ const String16& packageName, bool startIfModeDefault) {
Parcel data, reply;
data.writeInterfaceToken(IAppOpsService::getInterfaceDescriptor());
data.writeStrongBinder(token);
data.writeInt32(code);
data.writeInt32(uid);
data.writeString16(packageName);
+ data.writeInt32(startIfModeDefault ? 1 : 0);
remote()->transact(START_OPERATION_TRANSACTION, data, &reply);
// fail on exception
if (reply.readExceptionCode() != 0) return MODE_ERRORED;
@@ -159,7 +160,8 @@ status_t BnAppOpsService::onTransact(
int32_t code = data.readInt32();
int32_t uid = data.readInt32();
String16 packageName = data.readString16();
- int32_t res = startOperation(token, code, uid, packageName);
+ bool startIfModeDefault = data.readInt32() == 1;
+ int32_t res = startOperation(token, code, uid, packageName, startIfModeDefault);
reply->writeNoException();
reply->writeInt32(res);
return NO_ERROR;