diff options
| author | 2017-08-15 00:57:14 -0700 | |
|---|---|---|
| committer | 2017-10-24 18:31:41 -0700 | |
| commit | d296d0cd620db158f50434a06a190334e386eab9 (patch) | |
| tree | d0b25998682b44a34c3ca00b00fc99f14f52d2ea /libs/binder/ProcessState.cpp | |
| parent | fabd2f5c8f31b352a87c6d22228a6c6b5614522a (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.
Change-Id: I1efcc37148bc42cb7690d7eef8fa389433829564
Fixes: 63901963
Test: bit FrameworksCoreTests:android.os.BinderProxyCountingTest
Diffstat (limited to 'libs/binder/ProcessState.cpp')
| -rw-r--r-- | libs/binder/ProcessState.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 11dd5258a7..44039f83a2 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -276,7 +276,7 @@ sp<IBinder> ProcessState::getStrongProxyForHandle(int32_t handle) return NULL; } - b = new BpBinder(handle); + b = BpBinder::create(handle); e->binder = b; if (b) e->refs = b->getWeakRefs(); result = b; @@ -310,7 +310,7 @@ wp<IBinder> ProcessState::getWeakProxyForHandle(int32_t handle) // arriving from the driver. IBinder* b = e->binder; if (b == NULL || !e->refs->attemptIncWeak(this)) { - b = new BpBinder(handle); + b = BpBinder::create(handle); result = b; e->binder = b; if (b) e->refs = b->getWeakRefs(); |