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

Commit fe76013f authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Making native transactions one-way as well.

Fixing crash in native callback after changing permissions.

Bug: b/152633648
Test: adb shell appops set 1000 GET_USAGE_STATS deny
Change-Id: Ifbc2d2d982d2dd9b0b9c0ed109f827de9bed2768
parent e8a88834
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ public:
        data.writeInterfaceToken(IAppOpsCallback::getInterfaceDescriptor());
        data.writeInt32(op);
        data.writeString16(packageName);
        remote()->transact(OP_CHANGED_TRANSACTION, data, &reply);
        remote()->transact(OP_CHANGED_TRANSACTION, data, &reply, IBinder::FLAG_ONEWAY);
    }
};

@@ -58,7 +58,6 @@ status_t BnAppOpsCallback::onTransact(
            String16 packageName;
            (void)data.readString16(&packageName);
            opChanged(op, packageName);
            reply->writeNoException();
            return NO_ERROR;
        } break;
        default: