summaryrefslogtreecommitdiff
path: root/libs/binder/AppOpsManager.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-04-02 02:52:46 +0000
committer Steven Moreland <smoreland@google.com> 2021-04-09 20:16:46 +0000
commit1a3a8effca802995ece193b7d40cd80abba55798 (patch)
tree6d4d56881d48e2067459e26eb8d6f61a11ac7197 /libs/binder/AppOpsManager.cpp
parent64eff6c18215bf4c70ce8b56d2c1304157260bec (diff)
libbinder use stronger refbase semantics
As a larger example of how to use ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION. Bug: 184190315 Test: boot (relevant tests in TEST_MAPPING) Change-Id: I88283543e1f63fd1010f9cd3f63baefec84e6a84
Diffstat (limited to 'libs/binder/AppOpsManager.cpp')
-rw-r--r--libs/binder/AppOpsManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/AppOpsManager.cpp b/libs/binder/AppOpsManager.cpp
index 1c6b49135d..f3ea1a71d0 100644
--- a/libs/binder/AppOpsManager.cpp
+++ b/libs/binder/AppOpsManager.cpp
@@ -36,7 +36,7 @@ static const sp<IBinder>& getClientId() {
pthread_mutex_lock(&gClientIdMutex);
if (gClientId == nullptr) {
- gClientId = new BBinder();
+ gClientId = sp<BBinder>::make();
}
pthread_mutex_unlock(&gClientIdMutex);
return gClientId;