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

Commit b73020d2 authored by Brian Stack's avatar Brian Stack Committed by android-build-merger
Browse files

Merge "Only check noteOp in SensorService if AppOp >= 0" into qt-dev

am: c6af5302

Change-Id: I37580f13cfc6fefd8f0c43499bbeb462c2fa4ad3
parents dc463c40 c6af5302
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1550,7 +1550,8 @@ status_t SensorService::enable(const sp<SensorEventConnection>& connection,
    if (err == NO_ERROR) {
        connection->updateLooperRegistration(mLooper);

        if (sensor->getSensor().getRequiredPermission().size() > 0) {
        if (sensor->getSensor().getRequiredPermission().size() > 0 &&
                sensor->getSensor().getRequiredAppOp() >= 0) {
            connection->mHandleToAppOp[handle] = sensor->getSensor().getRequiredAppOp();
        }