diff options
author | 2020-03-06 02:11:21 +0000 | |
---|---|---|
committer | 2020-03-06 02:11:21 +0000 | |
commit | df1dde6bed4776de4e105a0187374225905561a1 (patch) | |
tree | 96844f0e735dccba872ecdb4d7b8ce897aabed80 | |
parent | 7bb19ce8c88a98f4fe7f8ed93d97cab4aa4ff740 (diff) | |
parent | 490bce1f1f9f0d185ac8e611ba66e1d2d9e1c85f (diff) |
Merge "libbinder: cleanup appOpNote globals" into rvc-dev am: c2dbfdc430 am: 867adf71d7 am: 3031a1189e am: 490bce1f1f
Change-Id: I7f8df01f3da24f2d03d14355ef5344c02042de74
-rw-r--r-- | libs/binder/AppOpsManager.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/binder/AppOpsManager.cpp b/libs/binder/AppOpsManager.cpp index c21f3ef226..e732829ada 100644 --- a/libs/binder/AppOpsManager.cpp +++ b/libs/binder/AppOpsManager.cpp @@ -42,12 +42,6 @@ static const sp<IBinder>& getClientId() { return gClientId; } -thread_local uint64_t notedAppOpsInThisBinderTransaction[2]; -thread_local int32_t uidOfThisBinderTransaction = -1; - -// Whether an appop should be collected: 0 == not initialized, 1 == don't note, 2 == note -uint8_t appOpsToNote[AppOpsManager::_NUM_OP] = {0}; - AppOpsManager::AppOpsManager() { } @@ -174,6 +168,9 @@ void AppOpsManager::setCameraAudioRestriction(int32_t mode) { // check it the appops needs to be collected and cache result bool AppOpsManager::shouldCollectNotes(int32_t opcode) { + // Whether an appop should be collected: 0 == not initialized, 1 == don't note, 2 == note + static uint8_t appOpsToNote[AppOpsManager::_NUM_OP] = {0}; + if (appOpsToNote[opcode] == 0) { if (getService()->shouldCollectNotes(opcode)) { appOpsToNote[opcode] = 2; |