diff options
author | 2020-03-05 15:06:19 -0800 | |
---|---|---|
committer | 2020-03-11 23:04:42 +0000 | |
commit | 90eb7eccc3f249e3b904c15ca6c5cfc3afd2bee6 (patch) | |
tree | 25b08e2e35c6ec5d4c725addc3226f052c70b82b | |
parent | 51f53cdf3b013d82dbf75cea90eec92e95c5c7a8 (diff) |
Rename featureId -> attributionTag
Bug: 148792795
Test: TH
Change-Id: Ic56606795e5e68ba76794198faf496eec6d87cd0
Exempt-From-Owner-Approval: API rename
-rw-r--r-- | libs/binder/AppOpsManager.cpp | 14 | ||||
-rw-r--r-- | libs/binder/IAppOpsService.cpp | 30 | ||||
-rw-r--r-- | libs/binder/include/binder/AppOpsManager.h | 6 | ||||
-rw-r--r-- | libs/binder/include/binder/IAppOpsService.h | 6 |
4 files changed, 28 insertions, 28 deletions
diff --git a/libs/binder/AppOpsManager.cpp b/libs/binder/AppOpsManager.cpp index e732829ada..1c6b49135d 100644 --- a/libs/binder/AppOpsManager.cpp +++ b/libs/binder/AppOpsManager.cpp @@ -96,11 +96,11 @@ int32_t AppOpsManager::noteOp(int32_t op, int32_t uid, const String16& callingPa } int32_t AppOpsManager::noteOp(int32_t op, int32_t uid, const String16& callingPackage, - const std::optional<String16>& featureId, const String16& message) { + const std::optional<String16>& attributionTag, const String16& message) { sp<IAppOpsService> service = getService(); int32_t mode = service != nullptr - ? service->noteOperation(op, uid, callingPackage, featureId, shouldCollectNotes(op), - message) + ? service->noteOperation(op, uid, callingPackage, attributionTag, + shouldCollectNotes(op), message) : AppOpsManager::MODE_IGNORED; return mode; @@ -113,12 +113,12 @@ int32_t AppOpsManager::startOpNoThrow(int32_t op, int32_t uid, const String16& c } int32_t AppOpsManager::startOpNoThrow(int32_t op, int32_t uid, const String16& callingPackage, - bool startIfModeDefault, const std::optional<String16>& featureId, + bool startIfModeDefault, const std::optional<String16>& attributionTag, const String16& message) { sp<IAppOpsService> service = getService(); int32_t mode = service != nullptr ? service->startOperation(getClientId(), op, uid, callingPackage, - featureId, startIfModeDefault, shouldCollectNotes(op), message) + attributionTag, startIfModeDefault, shouldCollectNotes(op), message) : AppOpsManager::MODE_IGNORED; return mode; @@ -129,10 +129,10 @@ void AppOpsManager::finishOp(int32_t op, int32_t uid, const String16& callingPac } void AppOpsManager::finishOp(int32_t op, int32_t uid, const String16& callingPackage, - const std::optional<String16>& callingFeatureId) { + const std::optional<String16>& attributionTag) { sp<IAppOpsService> service = getService(); if (service != nullptr) { - service->finishOperation(getClientId(), op, uid, callingPackage, callingFeatureId); + service->finishOperation(getClientId(), op, uid, callingPackage, attributionTag); } } diff --git a/libs/binder/IAppOpsService.cpp b/libs/binder/IAppOpsService.cpp index 50e23b50a7..cd78866624 100644 --- a/libs/binder/IAppOpsService.cpp +++ b/libs/binder/IAppOpsService.cpp @@ -49,14 +49,14 @@ public: } virtual int32_t noteOperation(int32_t code, int32_t uid, const String16& packageName, - const std::optional<String16>& featureId, bool shouldCollectAsyncNotedOp, + const std::optional<String16>& attributionTag, bool shouldCollectAsyncNotedOp, const String16& message) { Parcel data, reply; data.writeInterfaceToken(IAppOpsService::getInterfaceDescriptor()); data.writeInt32(code); data.writeInt32(uid); data.writeString16(packageName); - data.writeString16(featureId); + data.writeString16(attributionTag); data.writeInt32(shouldCollectAsyncNotedOp ? 1 : 0); data.writeString16(message); remote()->transact(NOTE_OPERATION_TRANSACTION, data, &reply); @@ -66,7 +66,7 @@ public: } virtual int32_t startOperation(const sp<IBinder>& token, int32_t code, int32_t uid, - const String16& packageName, const std::optional<String16>& featureId, + const String16& packageName, const std::optional<String16>& attributionTag, bool startIfModeDefault, bool shouldCollectAsyncNotedOp, const String16& message) { Parcel data, reply; data.writeInterfaceToken(IAppOpsService::getInterfaceDescriptor()); @@ -74,7 +74,7 @@ public: data.writeInt32(code); data.writeInt32(uid); data.writeString16(packageName); - data.writeString16(featureId); + data.writeString16(attributionTag); data.writeInt32(startIfModeDefault ? 1 : 0); data.writeInt32(shouldCollectAsyncNotedOp ? 1 : 0); data.writeString16(message); @@ -85,14 +85,14 @@ public: } virtual void finishOperation(const sp<IBinder>& token, int32_t code, int32_t uid, - const String16& packageName, const std::optional<String16>& featureId) { + const String16& packageName, const std::optional<String16>& attributionTag) { Parcel data, reply; data.writeInterfaceToken(IAppOpsService::getInterfaceDescriptor()); data.writeStrongBinder(token); data.writeInt32(code); data.writeInt32(uid); data.writeString16(packageName); - data.writeString16(featureId); + data.writeString16(attributionTag); remote()->transact(FINISH_OPERATION_TRANSACTION, data, &reply); } @@ -184,11 +184,11 @@ status_t BnAppOpsService::onTransact( int32_t code = data.readInt32(); int32_t uid = data.readInt32(); String16 packageName = data.readString16(); - std::optional<String16> featureId; - data.readString16(&featureId); + std::optional<String16> attributionTag; + data.readString16(&attributionTag); bool shouldCollectAsyncNotedOp = data.readInt32() == 1; String16 message = data.readString16(); - int32_t res = noteOperation(code, uid, packageName, featureId, + int32_t res = noteOperation(code, uid, packageName, attributionTag, shouldCollectAsyncNotedOp, message); reply->writeNoException(); reply->writeInt32(res); @@ -200,12 +200,12 @@ status_t BnAppOpsService::onTransact( int32_t code = data.readInt32(); int32_t uid = data.readInt32(); String16 packageName = data.readString16(); - std::optional<String16> featureId; - data.readString16(&featureId); + std::optional<String16> attributionTag; + data.readString16(&attributionTag); bool startIfModeDefault = data.readInt32() == 1; bool shouldCollectAsyncNotedOp = data.readInt32() == 1; String16 message = data.readString16(); - int32_t res = startOperation(token, code, uid, packageName, featureId, + int32_t res = startOperation(token, code, uid, packageName, attributionTag, startIfModeDefault, shouldCollectAsyncNotedOp, message); reply->writeNoException(); reply->writeInt32(res); @@ -217,9 +217,9 @@ status_t BnAppOpsService::onTransact( int32_t code = data.readInt32(); int32_t uid = data.readInt32(); String16 packageName = data.readString16(); - std::optional<String16> featureId; - data.readString16(&featureId); - finishOperation(token, code, uid, packageName, featureId); + std::optional<String16> attributionTag; + data.readString16(&attributionTag); + finishOperation(token, code, uid, packageName, attributionTag); reply->writeNoException(); return NO_ERROR; } break; diff --git a/libs/binder/include/binder/AppOpsManager.h b/libs/binder/include/binder/AppOpsManager.h index e4641822ad..4169243c1f 100644 --- a/libs/binder/include/binder/AppOpsManager.h +++ b/libs/binder/include/binder/AppOpsManager.h @@ -136,18 +136,18 @@ public: // const String16&) instead int32_t noteOp(int32_t op, int32_t uid, const String16& callingPackage); int32_t noteOp(int32_t op, int32_t uid, const String16& callingPackage, - const std::optional<String16>& featureId, const String16& message); + const std::optional<String16>& attributionTag, const String16& message); // @Deprecated, use startOpNoThrow(int32_t, int32_t, const String16&, bool, const String16&, // const String16&) instead int32_t startOpNoThrow(int32_t op, int32_t uid, const String16& callingPackage, bool startIfModeDefault); int32_t startOpNoThrow(int32_t op, int32_t uid, const String16& callingPackage, - bool startIfModeDefault, const std::optional<String16>& featureId, + bool startIfModeDefault, const std::optional<String16>& attributionTag, const String16& message); // @Deprecated, use finishOp(int32_t, int32_t, const String16&, bool, const String16&) instead void finishOp(int32_t op, int32_t uid, const String16& callingPackage); void finishOp(int32_t op, int32_t uid, const String16& callingPackage, - const std::optional<String16>& featureId); + const std::optional<String16>& attributionTag); void startWatchingMode(int32_t op, const String16& packageName, const sp<IAppOpsCallback>& callback); void stopWatchingMode(const sp<IAppOpsCallback>& callback); diff --git a/libs/binder/include/binder/IAppOpsService.h b/libs/binder/include/binder/IAppOpsService.h index 95a80ff268..a4a20c8b10 100644 --- a/libs/binder/include/binder/IAppOpsService.h +++ b/libs/binder/include/binder/IAppOpsService.h @@ -38,13 +38,13 @@ public: virtual int32_t checkOperation(int32_t code, int32_t uid, const String16& packageName) = 0; virtual int32_t noteOperation(int32_t code, int32_t uid, const String16& packageName, - const std::optional<String16>& featureId, bool shouldCollectAsyncNotedOp, + const std::optional<String16>& attributionTag, bool shouldCollectAsyncNotedOp, const String16& message) = 0; virtual int32_t startOperation(const sp<IBinder>& token, int32_t code, int32_t uid, - const String16& packageName, const std::optional<String16>& featureId, + const String16& packageName, const std::optional<String16>& attributionTag, bool startIfModeDefault, bool shouldCollectAsyncNotedOp, const String16& message) = 0; virtual void finishOperation(const sp<IBinder>& token, int32_t code, int32_t uid, - const String16& packageName, const std::optional<String16>& featureId) = 0; + const String16& packageName, const std::optional<String16>& attributionTag) = 0; virtual void startWatchingMode(int32_t op, const String16& packageName, const sp<IAppOpsCallback>& callback) = 0; virtual void stopWatchingMode(const sp<IAppOpsCallback>& callback) = 0; |