blob: 57440d508d5ac2fb447b5b284b31689e2554416c [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2005 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#define LOG_TAG "BpBinder"
18//#define LOG_NDEBUG 0
19
Mathias Agopianc5b2c0b2009-05-19 19:08:10 -070020#include <binder/BpBinder.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080021
Mathias Agopianc5b2c0b2009-05-19 19:08:10 -070022#include <binder/IPCThreadState.h>
Dianne Hackborn23eb1e22015-10-07 17:35:27 -070023#include <binder/IResultReceiver.h>
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -070024#include <cutils/compiler.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080025#include <utils/Log.h>
26
27#include <stdio.h>
28
Steve Block6807e592011-10-20 11:56:00 +010029//#undef ALOGV
30//#define ALOGV(...) fprintf(stderr, __VA_ARGS__)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080031
32namespace android {
33
34// ---------------------------------------------------------------------------
35
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -070036Mutex BpBinder::sTrackingLock;
37std::unordered_map<int32_t,uint32_t> BpBinder::sTrackingMap;
38int BpBinder::sNumTrackedUids = 0;
39std::atomic_bool BpBinder::sCountByUidEnabled(false);
40binder_proxy_limit_callback BpBinder::sLimitCallback;
41bool BpBinder::sBinderProxyThrottleCreate = false;
42
43// Arbitrarily high value that probably distinguishes a bad behaving app
44uint32_t BpBinder::sBinderProxyCountHighWatermark = 2500;
45// Another arbitrary value a binder count needs to drop below before another callback will be called
46uint32_t BpBinder::sBinderProxyCountLowWatermark = 2000;
47
48enum {
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -070049 LIMIT_REACHED_MASK = 0x80000000, // A flag denoting that the limit has been reached
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -070050 COUNTING_VALUE_MASK = 0x7FFFFFFF, // A mask of the remaining bits for the count value
51};
52
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080053BpBinder::ObjectManager::ObjectManager()
54{
55}
56
57BpBinder::ObjectManager::~ObjectManager()
58{
59 kill();
60}
61
62void BpBinder::ObjectManager::attach(
63 const void* objectID, void* object, void* cleanupCookie,
64 IBinder::object_cleanup_func func)
65{
66 entry_t e;
67 e.object = object;
68 e.cleanupCookie = cleanupCookie;
69 e.func = func;
70
71 if (mObjects.indexOfKey(objectID) >= 0) {
Steve Blocke6f43dd2012-01-06 19:20:56 +000072 ALOGE("Trying to attach object ID %p to binder ObjectManager %p with object %p, but object ID already in use",
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080073 objectID, this, object);
74 return;
75 }
76
77 mObjects.add(objectID, e);
78}
79
80void* BpBinder::ObjectManager::find(const void* objectID) const
81{
82 const ssize_t i = mObjects.indexOfKey(objectID);
Yi Kongfdd8da92018-06-07 17:52:27 -070083 if (i < 0) return nullptr;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080084 return mObjects.valueAt(i).object;
85}
86
87void BpBinder::ObjectManager::detach(const void* objectID)
88{
89 mObjects.removeItem(objectID);
90}
91
92void BpBinder::ObjectManager::kill()
93{
94 const size_t N = mObjects.size();
Mark Salyzynd4ecccf2014-05-30 16:35:57 -070095 ALOGV("Killing %zu objects in manager %p", N, this);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080096 for (size_t i=0; i<N; i++) {
97 const entry_t& e = mObjects.valueAt(i);
Yi Kongfdd8da92018-06-07 17:52:27 -070098 if (e.func != nullptr) {
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080099 e.func(mObjects.keyAt(i), e.object, e.cleanupCookie);
100 }
101 }
102
103 mObjects.clear();
104}
105
106// ---------------------------------------------------------------------------
107
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700108
109BpBinder* BpBinder::create(int32_t handle) {
110 int32_t trackedUid = -1;
111 if (sCountByUidEnabled) {
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700112 trackedUid = IPCThreadState::self()->getCallingUid();
113 AutoMutex _l(sTrackingLock);
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700114 uint32_t trackedValue = sTrackingMap[trackedUid];
115 if (CC_UNLIKELY(trackedValue & LIMIT_REACHED_MASK)) {
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700116 if (sBinderProxyThrottleCreate) {
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700117 return nullptr;
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700118 }
119 } else {
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700120 if ((trackedValue & COUNTING_VALUE_MASK) >= sBinderProxyCountHighWatermark) {
121 ALOGE("Too many binder proxy objects sent to uid %d from uid %d (%d proxies held)",
122 getuid(), trackedUid, trackedValue);
123 sTrackingMap[trackedUid] |= LIMIT_REACHED_MASK;
124 if (sLimitCallback) sLimitCallback(trackedUid);
125 if (sBinderProxyThrottleCreate) {
126 ALOGI("Throttling binder proxy creates from uid %d in uid %d until binder proxy"
127 " count drops below %d",
128 trackedUid, getuid(), sBinderProxyCountLowWatermark);
129 return nullptr;
130 }
131 }
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700132 }
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700133 sTrackingMap[trackedUid]++;
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700134 }
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700135 return new BpBinder(handle, trackedUid);
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700136}
137
138BpBinder::BpBinder(int32_t handle, int32_t trackedUid)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800139 : mHandle(handle)
140 , mAlive(1)
141 , mObitsSent(0)
Yi Kongfdd8da92018-06-07 17:52:27 -0700142 , mObituaries(nullptr)
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700143 , mTrackedUid(trackedUid)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800144{
Steve Block6807e592011-10-20 11:56:00 +0100145 ALOGV("Creating BpBinder %p handle %d\n", this, mHandle);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800146
147 extendObjectLifetime(OBJECT_LIFETIME_WEAK);
Martijn Coenen7c170bb2018-05-04 17:28:55 -0700148 IPCThreadState::self()->incWeakHandle(handle, this);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800149}
150
Steven Moreland85180c02019-07-16 14:24:20 -0700151int32_t BpBinder::handle() const {
152 return mHandle;
153}
154
Mathias Agopian83c04462009-05-22 19:00:22 -0700155bool BpBinder::isDescriptorCached() const {
156 Mutex::Autolock _l(mLock);
157 return mDescriptorCache.size() ? true : false;
158}
159
160const String16& BpBinder::getInterfaceDescriptor() const
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800161{
Mathias Agopian83c04462009-05-22 19:00:22 -0700162 if (isDescriptorCached() == false) {
163 Parcel send, reply;
164 // do the IPC without a lock held.
165 status_t err = const_cast<BpBinder*>(this)->transact(
166 INTERFACE_TRANSACTION, send, &reply);
167 if (err == NO_ERROR) {
168 String16 res(reply.readString16());
169 Mutex::Autolock _l(mLock);
170 // mDescriptorCache could have been assigned while the lock was
171 // released.
172 if (mDescriptorCache.size() == 0)
173 mDescriptorCache = res;
174 }
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800175 }
Mark Salyzynd4ecccf2014-05-30 16:35:57 -0700176
Mathias Agopian83c04462009-05-22 19:00:22 -0700177 // we're returning a reference to a non-static object here. Usually this
Mark Salyzynd4ecccf2014-05-30 16:35:57 -0700178 // is not something smart to do, however, with binder objects it is
Mathias Agopian83c04462009-05-22 19:00:22 -0700179 // (usually) safe because they are reference-counted.
Mark Salyzynd4ecccf2014-05-30 16:35:57 -0700180
Mathias Agopian83c04462009-05-22 19:00:22 -0700181 return mDescriptorCache;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800182}
183
184bool BpBinder::isBinderAlive() const
185{
186 return mAlive != 0;
187}
188
189status_t BpBinder::pingBinder()
190{
191 Parcel send;
192 Parcel reply;
Steven Moreland6e69d652019-07-10 14:17:55 -0700193 return transact(PING_TRANSACTION, send, &reply);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800194}
195
196status_t BpBinder::dump(int fd, const Vector<String16>& args)
197{
198 Parcel send;
199 Parcel reply;
200 send.writeFileDescriptor(fd);
201 const size_t numArgs = args.size();
202 send.writeInt32(numArgs);
203 for (size_t i = 0; i < numArgs; i++) {
204 send.writeString16(args[i]);
205 }
206 status_t err = transact(DUMP_TRANSACTION, send, &reply);
207 return err;
208}
209
Jiyong Parkb86c8662018-10-29 23:01:57 +0900210// NOLINTNEXTLINE(google-default-arguments)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800211status_t BpBinder::transact(
212 uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
213{
214 // Once a binder has died, it will never come back to life.
215 if (mAlive) {
216 status_t status = IPCThreadState::self()->transact(
217 mHandle, code, data, reply, flags);
218 if (status == DEAD_OBJECT) mAlive = 0;
Steven Morelanda86a3562019-08-01 23:28:34 +0000219
220 if (reply != nullptr) {
221 reply->setTransactingBinder(this);
222 }
223
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800224 return status;
225 }
226
227 return DEAD_OBJECT;
228}
229
Jiyong Parkb86c8662018-10-29 23:01:57 +0900230// NOLINTNEXTLINE(google-default-arguments)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800231status_t BpBinder::linkToDeath(
232 const sp<DeathRecipient>& recipient, void* cookie, uint32_t flags)
233{
234 Obituary ob;
235 ob.recipient = recipient;
236 ob.cookie = cookie;
237 ob.flags = flags;
238
Yi Kongfdd8da92018-06-07 17:52:27 -0700239 LOG_ALWAYS_FATAL_IF(recipient == nullptr,
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800240 "linkToDeath(): recipient must be non-NULL");
241
242 {
243 AutoMutex _l(mLock);
244
245 if (!mObitsSent) {
246 if (!mObituaries) {
247 mObituaries = new Vector<Obituary>;
248 if (!mObituaries) {
249 return NO_MEMORY;
250 }
Steve Block6807e592011-10-20 11:56:00 +0100251 ALOGV("Requesting death notification: %p handle %d\n", this, mHandle);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800252 getWeakRefs()->incWeak(this);
253 IPCThreadState* self = IPCThreadState::self();
254 self->requestDeathNotification(mHandle, this);
255 self->flushCommands();
256 }
257 ssize_t res = mObituaries->add(ob);
258 return res >= (ssize_t)NO_ERROR ? (status_t)NO_ERROR : res;
259 }
260 }
261
262 return DEAD_OBJECT;
263}
264
Jiyong Parkb86c8662018-10-29 23:01:57 +0900265// NOLINTNEXTLINE(google-default-arguments)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800266status_t BpBinder::unlinkToDeath(
267 const wp<DeathRecipient>& recipient, void* cookie, uint32_t flags,
268 wp<DeathRecipient>* outRecipient)
269{
270 AutoMutex _l(mLock);
271
272 if (mObitsSent) {
273 return DEAD_OBJECT;
274 }
275
276 const size_t N = mObituaries ? mObituaries->size() : 0;
277 for (size_t i=0; i<N; i++) {
278 const Obituary& obit = mObituaries->itemAt(i);
279 if ((obit.recipient == recipient
Yi Kongfdd8da92018-06-07 17:52:27 -0700280 || (recipient == nullptr && obit.cookie == cookie))
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800281 && obit.flags == flags) {
Yi Kongfdd8da92018-06-07 17:52:27 -0700282 if (outRecipient != nullptr) {
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800283 *outRecipient = mObituaries->itemAt(i).recipient;
284 }
285 mObituaries->removeAt(i);
286 if (mObituaries->size() == 0) {
Steve Block6807e592011-10-20 11:56:00 +0100287 ALOGV("Clearing death notification: %p handle %d\n", this, mHandle);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800288 IPCThreadState* self = IPCThreadState::self();
289 self->clearDeathNotification(mHandle, this);
290 self->flushCommands();
291 delete mObituaries;
Yi Kongfdd8da92018-06-07 17:52:27 -0700292 mObituaries = nullptr;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800293 }
294 return NO_ERROR;
295 }
296 }
297
298 return NAME_NOT_FOUND;
299}
300
301void BpBinder::sendObituary()
302{
Steve Block6807e592011-10-20 11:56:00 +0100303 ALOGV("Sending obituary for proxy %p handle %d, mObitsSent=%s\n",
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800304 this, mHandle, mObitsSent ? "true" : "false");
305
306 mAlive = 0;
307 if (mObitsSent) return;
308
309 mLock.lock();
310 Vector<Obituary>* obits = mObituaries;
Yi Kongfdd8da92018-06-07 17:52:27 -0700311 if(obits != nullptr) {
Steve Block6807e592011-10-20 11:56:00 +0100312 ALOGV("Clearing sent death notification: %p handle %d\n", this, mHandle);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800313 IPCThreadState* self = IPCThreadState::self();
314 self->clearDeathNotification(mHandle, this);
315 self->flushCommands();
Yi Kongfdd8da92018-06-07 17:52:27 -0700316 mObituaries = nullptr;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800317 }
318 mObitsSent = 1;
319 mLock.unlock();
320
Mark Salyzynd4ecccf2014-05-30 16:35:57 -0700321 ALOGV("Reporting death of proxy %p for %zu recipients\n",
322 this, obits ? obits->size() : 0U);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800323
Yi Kongfdd8da92018-06-07 17:52:27 -0700324 if (obits != nullptr) {
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800325 const size_t N = obits->size();
326 for (size_t i=0; i<N; i++) {
327 reportOneDeath(obits->itemAt(i));
328 }
329
330 delete obits;
331 }
332}
333
334void BpBinder::reportOneDeath(const Obituary& obit)
335{
336 sp<DeathRecipient> recipient = obit.recipient.promote();
Steve Block6807e592011-10-20 11:56:00 +0100337 ALOGV("Reporting death to recipient: %p\n", recipient.get());
Yi Kongfdd8da92018-06-07 17:52:27 -0700338 if (recipient == nullptr) return;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800339
340 recipient->binderDied(this);
341}
342
343
344void BpBinder::attachObject(
345 const void* objectID, void* object, void* cleanupCookie,
346 object_cleanup_func func)
347{
348 AutoMutex _l(mLock);
Steve Block6807e592011-10-20 11:56:00 +0100349 ALOGV("Attaching object %p to binder %p (manager=%p)", object, this, &mObjects);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800350 mObjects.attach(objectID, object, cleanupCookie, func);
351}
352
353void* BpBinder::findObject(const void* objectID) const
354{
355 AutoMutex _l(mLock);
356 return mObjects.find(objectID);
357}
358
359void BpBinder::detachObject(const void* objectID)
360{
361 AutoMutex _l(mLock);
362 mObjects.detach(objectID);
363}
364
365BpBinder* BpBinder::remoteBinder()
366{
367 return this;
368}
369
370BpBinder::~BpBinder()
371{
Steve Block6807e592011-10-20 11:56:00 +0100372 ALOGV("Destroying BpBinder %p handle %d\n", this, mHandle);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800373
374 IPCThreadState* ipc = IPCThreadState::self();
375
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700376 if (mTrackedUid >= 0) {
377 AutoMutex _l(sTrackingLock);
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700378 uint32_t trackedValue = sTrackingMap[mTrackedUid];
379 if (CC_UNLIKELY((trackedValue & COUNTING_VALUE_MASK) == 0)) {
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700380 ALOGE("Unexpected Binder Proxy tracking decrement in %p handle %d\n", this, mHandle);
381 } else {
382 if (CC_UNLIKELY(
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700383 (trackedValue & LIMIT_REACHED_MASK) &&
384 ((trackedValue & COUNTING_VALUE_MASK) <= sBinderProxyCountLowWatermark)
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700385 )) {
Michael Wachenschwanz74d967a2018-05-15 15:03:57 -0700386 ALOGI("Limit reached bit reset for uid %d (fewer than %d proxies from uid %d held)",
387 getuid(), mTrackedUid, sBinderProxyCountLowWatermark);
388 sTrackingMap[mTrackedUid] &= ~LIMIT_REACHED_MASK;
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700389 }
390 if (--sTrackingMap[mTrackedUid] == 0) {
391 sTrackingMap.erase(mTrackedUid);
392 }
393 }
394 }
395
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800396 if (ipc) {
397 ipc->expungeHandle(mHandle, this);
398 ipc->decWeakHandle(mHandle);
399 }
400}
401
402void BpBinder::onFirstRef()
403{
Steve Block6807e592011-10-20 11:56:00 +0100404 ALOGV("onFirstRef BpBinder %p handle %d\n", this, mHandle);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800405 IPCThreadState* ipc = IPCThreadState::self();
Martijn Coenen7c170bb2018-05-04 17:28:55 -0700406 if (ipc) ipc->incStrongHandle(mHandle, this);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800407}
408
Colin Cross6f4f3ab2014-02-05 17:42:44 -0800409void BpBinder::onLastStrongRef(const void* /*id*/)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800410{
Steve Block6807e592011-10-20 11:56:00 +0100411 ALOGV("onLastStrongRef BpBinder %p handle %d\n", this, mHandle);
412 IF_ALOGV() {
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800413 printRefs();
414 }
415 IPCThreadState* ipc = IPCThreadState::self();
416 if (ipc) ipc->decStrongHandle(mHandle);
Steven Moreland80d23932019-06-07 12:43:27 -0700417
418 mLock.lock();
419 Vector<Obituary>* obits = mObituaries;
420 if(obits != nullptr) {
421 if (!obits->isEmpty()) {
422 ALOGI("onLastStrongRef automatically unlinking death recipients");
423 }
424
425 if (ipc) ipc->clearDeathNotification(mHandle, this);
426 mObituaries = nullptr;
427 }
428 mLock.unlock();
429
430 if (obits != nullptr) {
431 // XXX Should we tell any remaining DeathRecipient
432 // objects that the last strong ref has gone away, so they
433 // are no longer linked?
434 delete obits;
435 }
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800436}
437
Colin Cross6f4f3ab2014-02-05 17:42:44 -0800438bool BpBinder::onIncStrongAttempted(uint32_t /*flags*/, const void* /*id*/)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800439{
Steve Block6807e592011-10-20 11:56:00 +0100440 ALOGV("onIncStrongAttempted BpBinder %p handle %d\n", this, mHandle);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800441 IPCThreadState* ipc = IPCThreadState::self();
442 return ipc ? ipc->attemptIncStrongHandle(mHandle) == NO_ERROR : false;
443}
444
Michael Wachenschwanzd296d0c2017-08-15 00:57:14 -0700445uint32_t BpBinder::getBinderProxyCount(uint32_t uid)
446{
447 AutoMutex _l(sTrackingLock);
448 auto it = sTrackingMap.find(uid);
449 if (it != sTrackingMap.end()) {
450 return it->second & COUNTING_VALUE_MASK;
451 }
452 return 0;
453}
454
455void BpBinder::getCountByUid(Vector<uint32_t>& uids, Vector<uint32_t>& counts)
456{
457 AutoMutex _l(sTrackingLock);
458 uids.setCapacity(sTrackingMap.size());
459 counts.setCapacity(sTrackingMap.size());
460 for (const auto& it : sTrackingMap) {
461 uids.push_back(it.first);
462 counts.push_back(it.second & COUNTING_VALUE_MASK);
463 }
464}
465
466void BpBinder::enableCountByUid() { sCountByUidEnabled.store(true); }
467void BpBinder::disableCountByUid() { sCountByUidEnabled.store(false); }
468void BpBinder::setCountByUidEnabled(bool enable) { sCountByUidEnabled.store(enable); }
469
470void BpBinder::setLimitCallback(binder_proxy_limit_callback cb) {
471 AutoMutex _l(sTrackingLock);
472 sLimitCallback = cb;
473}
474
475void BpBinder::setBinderProxyCountWatermarks(int high, int low) {
476 AutoMutex _l(sTrackingLock);
477 sBinderProxyCountHighWatermark = high;
478 sBinderProxyCountLowWatermark = low;
479}
480
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800481// ---------------------------------------------------------------------------
482
483}; // namespace android