diff options
author | 2020-03-05 23:40:01 +0000 | |
---|---|---|
committer | 2020-03-05 23:40:01 +0000 | |
commit | c2dbfdc430f82a0d914cf95bd02a098a06d85f78 (patch) | |
tree | c5f52fe54358fc68241fdc493dc8009c4255cbec | |
parent | dd413e97c7819aaf2dcf431ee0d43fa9b15b236a (diff) | |
parent | d83ecb04f9c78e23e8f413167f0b25642efef490 (diff) |
Merge "libbinder: cleanup appOpNote globals" into rvc-dev
-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 a22cf25671..43b0da307b 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; |