summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Michael Wachenschwanz <mwachens@google.com> 2017-08-15 00:57:14 -0700
committer Jiyong Park <jiyong@google.com> 2018-06-28 21:37:26 +0900
commit2d349907874d96f36d3ce00eaad5fdafed8c6620 (patch)
tree91a2c9e5d9d027fc1c76c2bf5664f382e62c2f2c /libs/binder/ProcessState.cpp
parent48b34b37a6ebe165b24263849cd10e9ab0614b61 (diff)
Native Side of Binder Proxy Tracking by Uid
Enable Processes to track the number of Binder Proxies objects held for each UID. Triggers callback when a count crosses a threshold, to handle bad behaving apps. Merged-In: I1efcc37148bc42cb7690d7eef8fa389433829564 Change-Id: I1efcc37148bc42cb7690d7eef8fa389433829564 Fixes: 63901963 Test: bit FrameworksCoreTests:android.os.BinderProxyCountingTest (cherry picked from commit d296d0cd620db158f50434a06a190334e386eab9)
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 6e7c427b12..3e871f87f9 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -282,7 +282,7 @@ sp<IBinder> ProcessState::getStrongProxyForHandle(int32_t handle)
return nullptr;
}
- b = new BpBinder(handle);
+ b = BpBinder::create(handle);
e->binder = b;
if (b) e->refs = b->getWeakRefs();
result = b;
@@ -316,7 +316,7 @@ wp<IBinder> ProcessState::getWeakProxyForHandle(int32_t handle)
// arriving from the driver.
IBinder* b = e->binder;
if (b == nullptr || !e->refs->attemptIncWeak(this)) {
- b = new BpBinder(handle);
+ b = BpBinder::create(handle);
result = b;
e->binder = b;
if (b) e->refs = b->getWeakRefs();