Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8e6e7c7 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Rename featureId -> attributionTag" into rvc-dev am: da8418c0 am: 021cd91f

Change-Id: Ib8cd23f43217c324c3cb6fb1ba45293e946c54ca
parents f47cf074 021cd91f
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -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::unique_ptr<String16>& featureId, const String16& message) {
        const std::unique_ptr<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::unique_ptr<String16>& featureId,
        bool startIfModeDefault, const std::unique_ptr<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::unique_ptr<String16>& callingFeatureId) {
        const std::unique_ptr<String16>& attributionTag) {
    sp<IAppOpsService> service = getService();
    if (service != nullptr) {
        service->finishOperation(getClientId(), op, uid, callingPackage, callingFeatureId);
        service->finishOperation(getClientId(), op, uid, callingPackage, attributionTag);
    }
}

+15 −15
Original line number Diff line number Diff line
@@ -47,14 +47,14 @@ public:
    }

    virtual int32_t noteOperation(int32_t code, int32_t uid, const String16& packageName,
                const std::unique_ptr<String16>& featureId, bool shouldCollectAsyncNotedOp,
                const std::unique_ptr<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);
@@ -64,7 +64,7 @@ public:
    }

    virtual int32_t startOperation(const sp<IBinder>& token, int32_t code, int32_t uid,
                const String16& packageName, const std::unique_ptr<String16>& featureId,
                const String16& packageName, const std::unique_ptr<String16>& attributionTag,
                bool startIfModeDefault, bool shouldCollectAsyncNotedOp, const String16& message) {
        Parcel data, reply;
        data.writeInterfaceToken(IAppOpsService::getInterfaceDescriptor());
@@ -72,7 +72,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);
@@ -83,14 +83,14 @@ public:
    }

    virtual void finishOperation(const sp<IBinder>& token, int32_t code, int32_t uid,
            const String16& packageName, const std::unique_ptr<String16>& featureId) {
            const String16& packageName, const std::unique_ptr<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);
    }

@@ -182,11 +182,11 @@ status_t BnAppOpsService::onTransact(
            int32_t code = data.readInt32();
            int32_t uid = data.readInt32();
            String16 packageName = data.readString16();
            std::unique_ptr<String16> featureId;
            data.readString16(&featureId);
            std::unique_ptr<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);
@@ -198,12 +198,12 @@ status_t BnAppOpsService::onTransact(
            int32_t code = data.readInt32();
            int32_t uid = data.readInt32();
            String16 packageName = data.readString16();
            std::unique_ptr<String16> featureId;
            data.readString16(&featureId);
            std::unique_ptr<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);
@@ -215,9 +215,9 @@ status_t BnAppOpsService::onTransact(
            int32_t code = data.readInt32();
            int32_t uid = data.readInt32();
            String16 packageName = data.readString16();
            std::unique_ptr<String16> featureId;
            data.readString16(&featureId);
            finishOperation(token, code, uid, packageName, featureId);
            std::unique_ptr<String16> attributionTag;
            data.readString16(&attributionTag);
            finishOperation(token, code, uid, packageName, attributionTag);
            reply->writeNoException();
            return NO_ERROR;
        } break;
+3 −3
Original line number Diff line number Diff line
@@ -134,18 +134,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::unique_ptr<String16>& featureId, const String16& message);
            const std::unique_ptr<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::unique_ptr<String16>& featureId,
            bool startIfModeDefault, const std::unique_ptr<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::unique_ptr<String16>& featureId);
            const std::unique_ptr<String16>& attributionTag);
    void startWatchingMode(int32_t op, const String16& packageName,
            const sp<IAppOpsCallback>& callback);
    void stopWatchingMode(const sp<IAppOpsCallback>& callback);
+3 −3
Original line number Diff line number Diff line
@@ -36,13 +36,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::unique_ptr<String16>& featureId, bool shouldCollectAsyncNotedOp,
            const std::unique_ptr<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::unique_ptr<String16>& featureId,
            const String16& packageName, const std::unique_ptr<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::unique_ptr<String16>& featureId) = 0;
            const String16& packageName, const std::unique_ptr<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;