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

Commit 7fcc470e authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

libbinder: move AppOpManager globals into function am: 1e219c14

Change-Id: I6ce508422da113d65daebee4feb9950b4df428ae
parents 230381c3 1e219c14
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -43,11 +43,10 @@ const int APP_OPS_MANAGER_UNAVAILABLE_MODE = AppOpsManager::MODE_IGNORED;

}  // namespace

static String16 _appops("appops");
static const sp<IBinder>& getClientId() {
    static pthread_mutex_t gClientIdMutex = PTHREAD_MUTEX_INITIALIZER;
    static sp<IBinder> gClientId;

static const sp<IBinder>& getClientId() {
    pthread_mutex_lock(&gClientIdMutex);
    if (gClientId == nullptr) {
        gClientId = new BBinder();
@@ -72,6 +71,7 @@ sp<IAppOpsService> AppOpsManager::getService() { return NULL; }
#else
sp<IAppOpsService> AppOpsManager::getService()
{
    static String16 _appops("appops");

    std::lock_guard<Mutex> scoped_lock(mLock);
    int64_t startTime = 0;