Loading cmds/servicemanager/binder.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -514,7 +514,7 @@ void bio_put_obj(struct binder_io *bio, void *ptr) return; return; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->type = BINDER_TYPE_BINDER; obj->hdr.type = BINDER_TYPE_BINDER; obj->binder = (uintptr_t)ptr; obj->binder = (uintptr_t)ptr; obj->cookie = 0; obj->cookie = 0; } } Loading @@ -532,7 +532,7 @@ void bio_put_ref(struct binder_io *bio, uint32_t handle) return; return; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->type = BINDER_TYPE_HANDLE; obj->hdr.type = BINDER_TYPE_HANDLE; obj->handle = handle; obj->handle = handle; obj->cookie = 0; obj->cookie = 0; } } Loading Loading @@ -649,7 +649,7 @@ uint32_t bio_get_ref(struct binder_io *bio) if (!obj) if (!obj) return 0; return 0; if (obj->type == BINDER_TYPE_HANDLE) if (obj->hdr.type == BINDER_TYPE_HANDLE) return obj->handle; return obj->handle; return 0; return 0; Loading libs/binder/Parcel.cpp +21 −21 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,7 @@ enum { void acquire_object(const sp<ProcessState>& proc, void acquire_object(const sp<ProcessState>& proc, const flat_binder_object& obj, const void* who, size_t* outAshmemSize) const flat_binder_object& obj, const void* who, size_t* outAshmemSize) { { switch (obj.type) { switch (obj.hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: if (obj.binder) { if (obj.binder) { LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie); LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie); Loading Loading @@ -140,7 +140,7 @@ void acquire_object(const sp<ProcessState>& proc, } } } } ALOGD("Invalid object type 0x%08x", obj.type); ALOGD("Invalid object type 0x%08x", obj.hdr.type); } } void acquire_object(const sp<ProcessState>& proc, void acquire_object(const sp<ProcessState>& proc, Loading @@ -152,7 +152,7 @@ void acquire_object(const sp<ProcessState>& proc, static void release_object(const sp<ProcessState>& proc, static void release_object(const sp<ProcessState>& proc, const flat_binder_object& obj, const void* who, size_t* outAshmemSize) const flat_binder_object& obj, const void* who, size_t* outAshmemSize) { { switch (obj.type) { switch (obj.hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: if (obj.binder) { if (obj.binder) { LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie); LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie); Loading Loading @@ -191,7 +191,7 @@ static void release_object(const sp<ProcessState>& proc, } } } } ALOGE("Invalid object type 0x%08x", obj.type); ALOGE("Invalid object type 0x%08x", obj.hdr.type); } } void release_object(const sp<ProcessState>& proc, void release_object(const sp<ProcessState>& proc, Loading Loading @@ -227,17 +227,17 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, ALOGE("null proxy"); ALOGE("null proxy"); } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_HANDLE; obj.hdr.type = BINDER_TYPE_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs()); obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs()); obj.cookie = reinterpret_cast<uintptr_t>(local); obj.cookie = reinterpret_cast<uintptr_t>(local); } } } else { } else { obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = 0; obj.binder = 0; obj.cookie = 0; obj.cookie = 0; } } Loading @@ -261,12 +261,12 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, ALOGE("null proxy"); ALOGE("null proxy"); } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_WEAK_HANDLE; obj.hdr.type = BINDER_TYPE_WEAK_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { obj.type = BINDER_TYPE_WEAK_BINDER; obj.hdr.type = BINDER_TYPE_WEAK_BINDER; obj.binder = reinterpret_cast<uintptr_t>(binder.get_refs()); obj.binder = reinterpret_cast<uintptr_t>(binder.get_refs()); obj.cookie = reinterpret_cast<uintptr_t>(binder.unsafe_get()); obj.cookie = reinterpret_cast<uintptr_t>(binder.unsafe_get()); } } Loading @@ -281,13 +281,13 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, // but we can't do that with the different reference counting // but we can't do that with the different reference counting // implementation we are using. // implementation we are using. ALOGE("Unable to unflatten Binder weak reference!"); ALOGE("Unable to unflatten Binder weak reference!"); obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = 0; obj.binder = 0; obj.cookie = 0; obj.cookie = 0; return finish_flatten_binder(NULL, obj, out); return finish_flatten_binder(NULL, obj, out); } else { } else { obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = 0; obj.binder = 0; obj.cookie = 0; obj.cookie = 0; return finish_flatten_binder(NULL, obj, out); return finish_flatten_binder(NULL, obj, out); Loading @@ -307,7 +307,7 @@ status_t unflatten_binder(const sp<ProcessState>& proc, const flat_binder_object* flat = in.readObject(false); const flat_binder_object* flat = in.readObject(false); if (flat) { if (flat) { switch (flat->type) { switch (flat->hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: *out = reinterpret_cast<IBinder*>(flat->cookie); *out = reinterpret_cast<IBinder*>(flat->cookie); return finish_unflatten_binder(NULL, *flat, in); return finish_unflatten_binder(NULL, *flat, in); Loading @@ -326,7 +326,7 @@ status_t unflatten_binder(const sp<ProcessState>& proc, const flat_binder_object* flat = in.readObject(false); const flat_binder_object* flat = in.readObject(false); if (flat) { if (flat) { switch (flat->type) { switch (flat->hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: *out = reinterpret_cast<IBinder*>(flat->cookie); *out = reinterpret_cast<IBinder*>(flat->cookie); return finish_unflatten_binder(NULL, *flat, in); return finish_unflatten_binder(NULL, *flat, in); Loading Loading @@ -543,7 +543,7 @@ status_t Parcel::appendFrom(const Parcel *parcel, size_t offset, size_t len) = reinterpret_cast<flat_binder_object*>(mData + off); = reinterpret_cast<flat_binder_object*>(mData + off); acquire_object(proc, *flat, this, &mOpenAshmemSize); acquire_object(proc, *flat, this, &mOpenAshmemSize); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { // If this is a file descriptor, we need to dup it so the // If this is a file descriptor, we need to dup it so the // new Parcel now owns its own fd, and can declare that we // new Parcel now owns its own fd, and can declare that we // officially know we have fds. // officially know we have fds. Loading Loading @@ -1152,7 +1152,7 @@ status_t Parcel::writeNativeHandle(const native_handle* handle) status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) { { flat_binder_object obj; flat_binder_object obj; obj.type = BINDER_TYPE_FD; obj.hdr.type = BINDER_TYPE_FD; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = fd; obj.handle = fd; Loading Loading @@ -1310,7 +1310,7 @@ restart_write: *reinterpret_cast<flat_binder_object*>(mData+mDataPos) = val; *reinterpret_cast<flat_binder_object*>(mData+mDataPos) = val; // remember if it's a file descriptor // remember if it's a file descriptor if (val.type == BINDER_TYPE_FD) { if (val.hdr.type == BINDER_TYPE_FD) { if (!mAllowFds) { if (!mAllowFds) { // fail before modifying our object index // fail before modifying our object index return FDS_NOT_ALLOWED; return FDS_NOT_ALLOWED; Loading Loading @@ -2132,7 +2132,7 @@ int Parcel::readFileDescriptor() const { { const flat_binder_object* flat = readObject(true); const flat_binder_object* flat = readObject(true); if (flat && flat->type == BINDER_TYPE_FD) { if (flat && flat->hdr.type == BINDER_TYPE_FD) { return flat->handle; return flat->handle; } } Loading Loading @@ -2325,7 +2325,7 @@ void Parcel::closeFileDescriptors() i--; i--; const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { //ALOGI("Closing fd: %ld", flat->handle); //ALOGI("Closing fd: %ld", flat->handle); close(flat->handle); close(flat->handle); } } Loading Loading @@ -2397,7 +2397,7 @@ void Parcel::print(TextOutput& to, uint32_t /*flags*/) const const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<const flat_binder_object*>(DATA+OBJS[i]); = reinterpret_cast<const flat_binder_object*>(DATA+OBJS[i]); to << endl << "Object #" << i << " @ " << (void*)OBJS[i] << ": " to << endl << "Object #" << i << " @ " << (void*)OBJS[i] << ": " << TypeCode(flat->type & 0x7f7f7f00) << TypeCode(flat->hdr.type & 0x7f7f7f00) << " = " << flat->binder; << " = " << flat->binder; } } } else { } else { Loading Loading @@ -2618,7 +2618,7 @@ status_t Parcel::continueWrite(size_t desired) for (size_t i=objectsSize; i<mObjectsSize; i++) { for (size_t i=objectsSize; i<mObjectsSize; i++) { const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { // will need to rescan because we may have lopped off the only FDs // will need to rescan because we may have lopped off the only FDs mFdsKnown = false; mFdsKnown = false; } } Loading Loading @@ -2728,7 +2728,7 @@ void Parcel::scanForFds() const for (size_t i=0; i<mObjectsSize; i++) { for (size_t i=0; i<mObjectsSize; i++) { const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<const flat_binder_object*>(mData + mObjects[i]); = reinterpret_cast<const flat_binder_object*>(mData + mObjects[i]); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { hasFds = true; hasFds = true; break; break; } } Loading Loading
cmds/servicemanager/binder.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -514,7 +514,7 @@ void bio_put_obj(struct binder_io *bio, void *ptr) return; return; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->type = BINDER_TYPE_BINDER; obj->hdr.type = BINDER_TYPE_BINDER; obj->binder = (uintptr_t)ptr; obj->binder = (uintptr_t)ptr; obj->cookie = 0; obj->cookie = 0; } } Loading @@ -532,7 +532,7 @@ void bio_put_ref(struct binder_io *bio, uint32_t handle) return; return; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj->type = BINDER_TYPE_HANDLE; obj->hdr.type = BINDER_TYPE_HANDLE; obj->handle = handle; obj->handle = handle; obj->cookie = 0; obj->cookie = 0; } } Loading Loading @@ -649,7 +649,7 @@ uint32_t bio_get_ref(struct binder_io *bio) if (!obj) if (!obj) return 0; return 0; if (obj->type == BINDER_TYPE_HANDLE) if (obj->hdr.type == BINDER_TYPE_HANDLE) return obj->handle; return obj->handle; return 0; return 0; Loading
libs/binder/Parcel.cpp +21 −21 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,7 @@ enum { void acquire_object(const sp<ProcessState>& proc, void acquire_object(const sp<ProcessState>& proc, const flat_binder_object& obj, const void* who, size_t* outAshmemSize) const flat_binder_object& obj, const void* who, size_t* outAshmemSize) { { switch (obj.type) { switch (obj.hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: if (obj.binder) { if (obj.binder) { LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie); LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie); Loading Loading @@ -140,7 +140,7 @@ void acquire_object(const sp<ProcessState>& proc, } } } } ALOGD("Invalid object type 0x%08x", obj.type); ALOGD("Invalid object type 0x%08x", obj.hdr.type); } } void acquire_object(const sp<ProcessState>& proc, void acquire_object(const sp<ProcessState>& proc, Loading @@ -152,7 +152,7 @@ void acquire_object(const sp<ProcessState>& proc, static void release_object(const sp<ProcessState>& proc, static void release_object(const sp<ProcessState>& proc, const flat_binder_object& obj, const void* who, size_t* outAshmemSize) const flat_binder_object& obj, const void* who, size_t* outAshmemSize) { { switch (obj.type) { switch (obj.hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: if (obj.binder) { if (obj.binder) { LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie); LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie); Loading Loading @@ -191,7 +191,7 @@ static void release_object(const sp<ProcessState>& proc, } } } } ALOGE("Invalid object type 0x%08x", obj.type); ALOGE("Invalid object type 0x%08x", obj.hdr.type); } } void release_object(const sp<ProcessState>& proc, void release_object(const sp<ProcessState>& proc, Loading Loading @@ -227,17 +227,17 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, ALOGE("null proxy"); ALOGE("null proxy"); } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_HANDLE; obj.hdr.type = BINDER_TYPE_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs()); obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs()); obj.cookie = reinterpret_cast<uintptr_t>(local); obj.cookie = reinterpret_cast<uintptr_t>(local); } } } else { } else { obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = 0; obj.binder = 0; obj.cookie = 0; obj.cookie = 0; } } Loading @@ -261,12 +261,12 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, ALOGE("null proxy"); ALOGE("null proxy"); } } const int32_t handle = proxy ? proxy->handle() : 0; const int32_t handle = proxy ? proxy->handle() : 0; obj.type = BINDER_TYPE_WEAK_HANDLE; obj.hdr.type = BINDER_TYPE_WEAK_HANDLE; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = handle; obj.handle = handle; obj.cookie = 0; obj.cookie = 0; } else { } else { obj.type = BINDER_TYPE_WEAK_BINDER; obj.hdr.type = BINDER_TYPE_WEAK_BINDER; obj.binder = reinterpret_cast<uintptr_t>(binder.get_refs()); obj.binder = reinterpret_cast<uintptr_t>(binder.get_refs()); obj.cookie = reinterpret_cast<uintptr_t>(binder.unsafe_get()); obj.cookie = reinterpret_cast<uintptr_t>(binder.unsafe_get()); } } Loading @@ -281,13 +281,13 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/, // but we can't do that with the different reference counting // but we can't do that with the different reference counting // implementation we are using. // implementation we are using. ALOGE("Unable to unflatten Binder weak reference!"); ALOGE("Unable to unflatten Binder weak reference!"); obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = 0; obj.binder = 0; obj.cookie = 0; obj.cookie = 0; return finish_flatten_binder(NULL, obj, out); return finish_flatten_binder(NULL, obj, out); } else { } else { obj.type = BINDER_TYPE_BINDER; obj.hdr.type = BINDER_TYPE_BINDER; obj.binder = 0; obj.binder = 0; obj.cookie = 0; obj.cookie = 0; return finish_flatten_binder(NULL, obj, out); return finish_flatten_binder(NULL, obj, out); Loading @@ -307,7 +307,7 @@ status_t unflatten_binder(const sp<ProcessState>& proc, const flat_binder_object* flat = in.readObject(false); const flat_binder_object* flat = in.readObject(false); if (flat) { if (flat) { switch (flat->type) { switch (flat->hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: *out = reinterpret_cast<IBinder*>(flat->cookie); *out = reinterpret_cast<IBinder*>(flat->cookie); return finish_unflatten_binder(NULL, *flat, in); return finish_unflatten_binder(NULL, *flat, in); Loading @@ -326,7 +326,7 @@ status_t unflatten_binder(const sp<ProcessState>& proc, const flat_binder_object* flat = in.readObject(false); const flat_binder_object* flat = in.readObject(false); if (flat) { if (flat) { switch (flat->type) { switch (flat->hdr.type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_BINDER: *out = reinterpret_cast<IBinder*>(flat->cookie); *out = reinterpret_cast<IBinder*>(flat->cookie); return finish_unflatten_binder(NULL, *flat, in); return finish_unflatten_binder(NULL, *flat, in); Loading Loading @@ -543,7 +543,7 @@ status_t Parcel::appendFrom(const Parcel *parcel, size_t offset, size_t len) = reinterpret_cast<flat_binder_object*>(mData + off); = reinterpret_cast<flat_binder_object*>(mData + off); acquire_object(proc, *flat, this, &mOpenAshmemSize); acquire_object(proc, *flat, this, &mOpenAshmemSize); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { // If this is a file descriptor, we need to dup it so the // If this is a file descriptor, we need to dup it so the // new Parcel now owns its own fd, and can declare that we // new Parcel now owns its own fd, and can declare that we // officially know we have fds. // officially know we have fds. Loading Loading @@ -1152,7 +1152,7 @@ status_t Parcel::writeNativeHandle(const native_handle* handle) status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) { { flat_binder_object obj; flat_binder_object obj; obj.type = BINDER_TYPE_FD; obj.hdr.type = BINDER_TYPE_FD; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ obj.handle = fd; obj.handle = fd; Loading Loading @@ -1310,7 +1310,7 @@ restart_write: *reinterpret_cast<flat_binder_object*>(mData+mDataPos) = val; *reinterpret_cast<flat_binder_object*>(mData+mDataPos) = val; // remember if it's a file descriptor // remember if it's a file descriptor if (val.type == BINDER_TYPE_FD) { if (val.hdr.type == BINDER_TYPE_FD) { if (!mAllowFds) { if (!mAllowFds) { // fail before modifying our object index // fail before modifying our object index return FDS_NOT_ALLOWED; return FDS_NOT_ALLOWED; Loading Loading @@ -2132,7 +2132,7 @@ int Parcel::readFileDescriptor() const { { const flat_binder_object* flat = readObject(true); const flat_binder_object* flat = readObject(true); if (flat && flat->type == BINDER_TYPE_FD) { if (flat && flat->hdr.type == BINDER_TYPE_FD) { return flat->handle; return flat->handle; } } Loading Loading @@ -2325,7 +2325,7 @@ void Parcel::closeFileDescriptors() i--; i--; const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { //ALOGI("Closing fd: %ld", flat->handle); //ALOGI("Closing fd: %ld", flat->handle); close(flat->handle); close(flat->handle); } } Loading Loading @@ -2397,7 +2397,7 @@ void Parcel::print(TextOutput& to, uint32_t /*flags*/) const const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<const flat_binder_object*>(DATA+OBJS[i]); = reinterpret_cast<const flat_binder_object*>(DATA+OBJS[i]); to << endl << "Object #" << i << " @ " << (void*)OBJS[i] << ": " to << endl << "Object #" << i << " @ " << (void*)OBJS[i] << ": " << TypeCode(flat->type & 0x7f7f7f00) << TypeCode(flat->hdr.type & 0x7f7f7f00) << " = " << flat->binder; << " = " << flat->binder; } } } else { } else { Loading Loading @@ -2618,7 +2618,7 @@ status_t Parcel::continueWrite(size_t desired) for (size_t i=objectsSize; i<mObjectsSize; i++) { for (size_t i=objectsSize; i<mObjectsSize; i++) { const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { // will need to rescan because we may have lopped off the only FDs // will need to rescan because we may have lopped off the only FDs mFdsKnown = false; mFdsKnown = false; } } Loading Loading @@ -2728,7 +2728,7 @@ void Parcel::scanForFds() const for (size_t i=0; i<mObjectsSize; i++) { for (size_t i=0; i<mObjectsSize; i++) { const flat_binder_object* flat const flat_binder_object* flat = reinterpret_cast<const flat_binder_object*>(mData + mObjects[i]); = reinterpret_cast<const flat_binder_object*>(mData + mObjects[i]); if (flat->type == BINDER_TYPE_FD) { if (flat->hdr.type == BINDER_TYPE_FD) { hasFds = true; hasFds = true; break; break; } } Loading