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

Commit 8205d7fa authored by Svet Ganov's avatar Svet Ganov Committed by android-build-merger
Browse files

Merge "Refresh the native app ops manager\'s token if needed." into nyc-dev am: 78faa5d0

am: 5ceb6644

* commit '5ceb6644':
  Refresh the native app ops manager's token if needed.
parents c4e9893d 5ceb6644
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -42,7 +42,7 @@ static sp<IBinder> gToken;


static const sp<IBinder>& getToken(const sp<IAppOpsService>& service) {
static const sp<IBinder>& getToken(const sp<IAppOpsService>& service) {
    pthread_mutex_lock(&gTokenMutex);
    pthread_mutex_lock(&gTokenMutex);
    if (gToken == NULL) {
    if (gToken == NULL || gToken->pingBinder() != NO_ERROR) {
        gToken = service->getToken(new BBinder());
        gToken = service->getToken(new BBinder());
    }
    }
    pthread_mutex_unlock(&gTokenMutex);
    pthread_mutex_unlock(&gTokenMutex);