Loading libs/binder/ndk/ibinder.cpp +2 −3 Original line number Original line Diff line number Diff line Loading @@ -426,7 +426,7 @@ binder_status_t AIBinder_prepareTransaction(AIBinder* binder, AParcel** in) { } } *in = new AParcel(binder); *in = new AParcel(binder); status_t status = (**in)->writeInterfaceToken(clazz->getInterfaceDescriptor()); status_t status = (*in)->get()->writeInterfaceToken(clazz->getInterfaceDescriptor()); binder_status_t ret = PruneStatusT(status); binder_status_t ret = PruneStatusT(status); if (ret != STATUS_OK) { if (ret != STATUS_OK) { Loading Loading @@ -472,8 +472,7 @@ binder_status_t AIBinder_transact(AIBinder* binder, transaction_code_t code, APa *out = new AParcel(binder); *out = new AParcel(binder); status_t status = status_t status = binder->getBinder()->transact(code, *(*in)->get(), (*out)->get(), flags); binder->getBinder()->transact(code, *(*in)->operator->(), (*out)->operator->(), flags); binder_status_t ret = PruneStatusT(status); binder_status_t ret = PruneStatusT(status); if (ret != STATUS_OK) { if (ret != STATUS_OK) { Loading libs/binder/ndk/parcel.cpp +21 −21 Original line number Original line Diff line number Diff line Loading @@ -38,11 +38,11 @@ void AParcel_delete(AParcel** parcel) { binder_status_t AParcel_writeStrongBinder(AParcel* parcel, AIBinder* binder) { binder_status_t AParcel_writeStrongBinder(AParcel* parcel, AIBinder* binder) { sp<IBinder> writeBinder = binder != nullptr ? binder->getBinder() : nullptr; sp<IBinder> writeBinder = binder != nullptr ? binder->getBinder() : nullptr; return (*parcel)->writeStrongBinder(writeBinder); return parcel->get()->writeStrongBinder(writeBinder); } } binder_status_t AParcel_readStrongBinder(const AParcel* parcel, AIBinder** binder) { binder_status_t AParcel_readStrongBinder(const AParcel* parcel, AIBinder** binder) { sp<IBinder> readBinder = nullptr; sp<IBinder> readBinder = nullptr; status_t status = (*parcel)->readStrongBinder(&readBinder); status_t status = parcel->get()->readStrongBinder(&readBinder); if (status != STATUS_OK) { if (status != STATUS_OK) { return PruneStatusT(status); return PruneStatusT(status); } } Loading @@ -53,7 +53,7 @@ binder_status_t AParcel_readStrongBinder(const AParcel* parcel, AIBinder** binde } } binder_status_t AParcel_readNullableStrongBinder(const AParcel* parcel, AIBinder** binder) { binder_status_t AParcel_readNullableStrongBinder(const AParcel* parcel, AIBinder** binder) { sp<IBinder> readBinder = nullptr; sp<IBinder> readBinder = nullptr; status_t status = (*parcel)->readNullableStrongBinder(&readBinder); status_t status = parcel->get()->readNullableStrongBinder(&readBinder); if (status != STATUS_OK) { if (status != STATUS_OK) { return PruneStatusT(status); return PruneStatusT(status); } } Loading @@ -67,92 +67,92 @@ binder_status_t AParcel_readNullableStrongBinder(const AParcel* parcel, AIBinder // libbinder and this library. // libbinder and this library. // @START // @START binder_status_t AParcel_writeInt32(AParcel* parcel, int32_t value) { binder_status_t AParcel_writeInt32(AParcel* parcel, int32_t value) { status_t status = (*parcel)->writeInt32(value); status_t status = parcel->get()->writeInt32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeUint32(AParcel* parcel, uint32_t value) { binder_status_t AParcel_writeUint32(AParcel* parcel, uint32_t value) { status_t status = (*parcel)->writeUint32(value); status_t status = parcel->get()->writeUint32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeInt64(AParcel* parcel, int64_t value) { binder_status_t AParcel_writeInt64(AParcel* parcel, int64_t value) { status_t status = (*parcel)->writeInt64(value); status_t status = parcel->get()->writeInt64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeUint64(AParcel* parcel, uint64_t value) { binder_status_t AParcel_writeUint64(AParcel* parcel, uint64_t value) { status_t status = (*parcel)->writeUint64(value); status_t status = parcel->get()->writeUint64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeFloat(AParcel* parcel, float value) { binder_status_t AParcel_writeFloat(AParcel* parcel, float value) { status_t status = (*parcel)->writeFloat(value); status_t status = parcel->get()->writeFloat(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeDouble(AParcel* parcel, double value) { binder_status_t AParcel_writeDouble(AParcel* parcel, double value) { status_t status = (*parcel)->writeDouble(value); status_t status = parcel->get()->writeDouble(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeBool(AParcel* parcel, bool value) { binder_status_t AParcel_writeBool(AParcel* parcel, bool value) { status_t status = (*parcel)->writeBool(value); status_t status = parcel->get()->writeBool(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeChar(AParcel* parcel, char16_t value) { binder_status_t AParcel_writeChar(AParcel* parcel, char16_t value) { status_t status = (*parcel)->writeChar(value); status_t status = parcel->get()->writeChar(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeByte(AParcel* parcel, int8_t value) { binder_status_t AParcel_writeByte(AParcel* parcel, int8_t value) { status_t status = (*parcel)->writeByte(value); status_t status = parcel->get()->writeByte(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readInt32(const AParcel* parcel, int32_t* value) { binder_status_t AParcel_readInt32(const AParcel* parcel, int32_t* value) { status_t status = (*parcel)->readInt32(value); status_t status = parcel->get()->readInt32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readUint32(const AParcel* parcel, uint32_t* value) { binder_status_t AParcel_readUint32(const AParcel* parcel, uint32_t* value) { status_t status = (*parcel)->readUint32(value); status_t status = parcel->get()->readUint32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readInt64(const AParcel* parcel, int64_t* value) { binder_status_t AParcel_readInt64(const AParcel* parcel, int64_t* value) { status_t status = (*parcel)->readInt64(value); status_t status = parcel->get()->readInt64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readUint64(const AParcel* parcel, uint64_t* value) { binder_status_t AParcel_readUint64(const AParcel* parcel, uint64_t* value) { status_t status = (*parcel)->readUint64(value); status_t status = parcel->get()->readUint64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readFloat(const AParcel* parcel, float* value) { binder_status_t AParcel_readFloat(const AParcel* parcel, float* value) { status_t status = (*parcel)->readFloat(value); status_t status = parcel->get()->readFloat(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readDouble(const AParcel* parcel, double* value) { binder_status_t AParcel_readDouble(const AParcel* parcel, double* value) { status_t status = (*parcel)->readDouble(value); status_t status = parcel->get()->readDouble(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readBool(const AParcel* parcel, bool* value) { binder_status_t AParcel_readBool(const AParcel* parcel, bool* value) { status_t status = (*parcel)->readBool(value); status_t status = parcel->get()->readBool(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readChar(const AParcel* parcel, char16_t* value) { binder_status_t AParcel_readChar(const AParcel* parcel, char16_t* value) { status_t status = (*parcel)->readChar(value); status_t status = parcel->get()->readChar(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readByte(const AParcel* parcel, int8_t* value) { binder_status_t AParcel_readByte(const AParcel* parcel, int8_t* value) { status_t status = (*parcel)->readByte(value); status_t status = parcel->get()->readByte(value); return PruneStatusT(status); return PruneStatusT(status); } } Loading libs/binder/ndk/parcel_internal.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -24,8 +24,8 @@ #include "ibinder_internal.h" #include "ibinder_internal.h" struct AParcel { struct AParcel { const ::android::Parcel* operator->() const { return mParcel; } const ::android::Parcel* get() const { return mParcel; } ::android::Parcel* operator->() { return mParcel; } ::android::Parcel* get() { return mParcel; } AParcel(const AIBinder* binder) : AParcel(binder, new ::android::Parcel, true /*owns*/) {} AParcel(const AIBinder* binder) : AParcel(binder, new ::android::Parcel, true /*owns*/) {} AParcel(const AIBinder* binder, ::android::Parcel* parcel, bool owns) AParcel(const AIBinder* binder, ::android::Parcel* parcel, bool owns) Loading libs/binder/ndk/scripts/gen_parcel_helper.py +2 −2 Original line number Original line Diff line number Diff line Loading @@ -68,7 +68,7 @@ def main(): header += " */\n" header += " */\n" header += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value);\n\n" header += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value);\n\n" source += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value) {\n" source += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value) {\n" source += " status_t status = (*parcel)->write" + pretty + "(value);\n" source += " status_t status = parcel->get()->write" + pretty + "(value);\n" source += " return PruneStatusT(status);\n" source += " return PruneStatusT(status);\n" source += "}\n\n" source += "}\n\n" Loading @@ -78,7 +78,7 @@ def main(): header += " */\n" header += " */\n" header += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value);\n\n" header += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value);\n\n" source += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value) {\n" source += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value) {\n" source += " status_t status = (*parcel)->read" + pretty + "(value);\n" source += " status_t status = parcel->get()->read" + pretty + "(value);\n" source += " return PruneStatusT(status);\n" source += " return PruneStatusT(status);\n" source += "}\n\n" source += "}\n\n" Loading Loading
libs/binder/ndk/ibinder.cpp +2 −3 Original line number Original line Diff line number Diff line Loading @@ -426,7 +426,7 @@ binder_status_t AIBinder_prepareTransaction(AIBinder* binder, AParcel** in) { } } *in = new AParcel(binder); *in = new AParcel(binder); status_t status = (**in)->writeInterfaceToken(clazz->getInterfaceDescriptor()); status_t status = (*in)->get()->writeInterfaceToken(clazz->getInterfaceDescriptor()); binder_status_t ret = PruneStatusT(status); binder_status_t ret = PruneStatusT(status); if (ret != STATUS_OK) { if (ret != STATUS_OK) { Loading Loading @@ -472,8 +472,7 @@ binder_status_t AIBinder_transact(AIBinder* binder, transaction_code_t code, APa *out = new AParcel(binder); *out = new AParcel(binder); status_t status = status_t status = binder->getBinder()->transact(code, *(*in)->get(), (*out)->get(), flags); binder->getBinder()->transact(code, *(*in)->operator->(), (*out)->operator->(), flags); binder_status_t ret = PruneStatusT(status); binder_status_t ret = PruneStatusT(status); if (ret != STATUS_OK) { if (ret != STATUS_OK) { Loading
libs/binder/ndk/parcel.cpp +21 −21 Original line number Original line Diff line number Diff line Loading @@ -38,11 +38,11 @@ void AParcel_delete(AParcel** parcel) { binder_status_t AParcel_writeStrongBinder(AParcel* parcel, AIBinder* binder) { binder_status_t AParcel_writeStrongBinder(AParcel* parcel, AIBinder* binder) { sp<IBinder> writeBinder = binder != nullptr ? binder->getBinder() : nullptr; sp<IBinder> writeBinder = binder != nullptr ? binder->getBinder() : nullptr; return (*parcel)->writeStrongBinder(writeBinder); return parcel->get()->writeStrongBinder(writeBinder); } } binder_status_t AParcel_readStrongBinder(const AParcel* parcel, AIBinder** binder) { binder_status_t AParcel_readStrongBinder(const AParcel* parcel, AIBinder** binder) { sp<IBinder> readBinder = nullptr; sp<IBinder> readBinder = nullptr; status_t status = (*parcel)->readStrongBinder(&readBinder); status_t status = parcel->get()->readStrongBinder(&readBinder); if (status != STATUS_OK) { if (status != STATUS_OK) { return PruneStatusT(status); return PruneStatusT(status); } } Loading @@ -53,7 +53,7 @@ binder_status_t AParcel_readStrongBinder(const AParcel* parcel, AIBinder** binde } } binder_status_t AParcel_readNullableStrongBinder(const AParcel* parcel, AIBinder** binder) { binder_status_t AParcel_readNullableStrongBinder(const AParcel* parcel, AIBinder** binder) { sp<IBinder> readBinder = nullptr; sp<IBinder> readBinder = nullptr; status_t status = (*parcel)->readNullableStrongBinder(&readBinder); status_t status = parcel->get()->readNullableStrongBinder(&readBinder); if (status != STATUS_OK) { if (status != STATUS_OK) { return PruneStatusT(status); return PruneStatusT(status); } } Loading @@ -67,92 +67,92 @@ binder_status_t AParcel_readNullableStrongBinder(const AParcel* parcel, AIBinder // libbinder and this library. // libbinder and this library. // @START // @START binder_status_t AParcel_writeInt32(AParcel* parcel, int32_t value) { binder_status_t AParcel_writeInt32(AParcel* parcel, int32_t value) { status_t status = (*parcel)->writeInt32(value); status_t status = parcel->get()->writeInt32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeUint32(AParcel* parcel, uint32_t value) { binder_status_t AParcel_writeUint32(AParcel* parcel, uint32_t value) { status_t status = (*parcel)->writeUint32(value); status_t status = parcel->get()->writeUint32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeInt64(AParcel* parcel, int64_t value) { binder_status_t AParcel_writeInt64(AParcel* parcel, int64_t value) { status_t status = (*parcel)->writeInt64(value); status_t status = parcel->get()->writeInt64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeUint64(AParcel* parcel, uint64_t value) { binder_status_t AParcel_writeUint64(AParcel* parcel, uint64_t value) { status_t status = (*parcel)->writeUint64(value); status_t status = parcel->get()->writeUint64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeFloat(AParcel* parcel, float value) { binder_status_t AParcel_writeFloat(AParcel* parcel, float value) { status_t status = (*parcel)->writeFloat(value); status_t status = parcel->get()->writeFloat(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeDouble(AParcel* parcel, double value) { binder_status_t AParcel_writeDouble(AParcel* parcel, double value) { status_t status = (*parcel)->writeDouble(value); status_t status = parcel->get()->writeDouble(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeBool(AParcel* parcel, bool value) { binder_status_t AParcel_writeBool(AParcel* parcel, bool value) { status_t status = (*parcel)->writeBool(value); status_t status = parcel->get()->writeBool(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeChar(AParcel* parcel, char16_t value) { binder_status_t AParcel_writeChar(AParcel* parcel, char16_t value) { status_t status = (*parcel)->writeChar(value); status_t status = parcel->get()->writeChar(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_writeByte(AParcel* parcel, int8_t value) { binder_status_t AParcel_writeByte(AParcel* parcel, int8_t value) { status_t status = (*parcel)->writeByte(value); status_t status = parcel->get()->writeByte(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readInt32(const AParcel* parcel, int32_t* value) { binder_status_t AParcel_readInt32(const AParcel* parcel, int32_t* value) { status_t status = (*parcel)->readInt32(value); status_t status = parcel->get()->readInt32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readUint32(const AParcel* parcel, uint32_t* value) { binder_status_t AParcel_readUint32(const AParcel* parcel, uint32_t* value) { status_t status = (*parcel)->readUint32(value); status_t status = parcel->get()->readUint32(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readInt64(const AParcel* parcel, int64_t* value) { binder_status_t AParcel_readInt64(const AParcel* parcel, int64_t* value) { status_t status = (*parcel)->readInt64(value); status_t status = parcel->get()->readInt64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readUint64(const AParcel* parcel, uint64_t* value) { binder_status_t AParcel_readUint64(const AParcel* parcel, uint64_t* value) { status_t status = (*parcel)->readUint64(value); status_t status = parcel->get()->readUint64(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readFloat(const AParcel* parcel, float* value) { binder_status_t AParcel_readFloat(const AParcel* parcel, float* value) { status_t status = (*parcel)->readFloat(value); status_t status = parcel->get()->readFloat(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readDouble(const AParcel* parcel, double* value) { binder_status_t AParcel_readDouble(const AParcel* parcel, double* value) { status_t status = (*parcel)->readDouble(value); status_t status = parcel->get()->readDouble(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readBool(const AParcel* parcel, bool* value) { binder_status_t AParcel_readBool(const AParcel* parcel, bool* value) { status_t status = (*parcel)->readBool(value); status_t status = parcel->get()->readBool(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readChar(const AParcel* parcel, char16_t* value) { binder_status_t AParcel_readChar(const AParcel* parcel, char16_t* value) { status_t status = (*parcel)->readChar(value); status_t status = parcel->get()->readChar(value); return PruneStatusT(status); return PruneStatusT(status); } } binder_status_t AParcel_readByte(const AParcel* parcel, int8_t* value) { binder_status_t AParcel_readByte(const AParcel* parcel, int8_t* value) { status_t status = (*parcel)->readByte(value); status_t status = parcel->get()->readByte(value); return PruneStatusT(status); return PruneStatusT(status); } } Loading
libs/binder/ndk/parcel_internal.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -24,8 +24,8 @@ #include "ibinder_internal.h" #include "ibinder_internal.h" struct AParcel { struct AParcel { const ::android::Parcel* operator->() const { return mParcel; } const ::android::Parcel* get() const { return mParcel; } ::android::Parcel* operator->() { return mParcel; } ::android::Parcel* get() { return mParcel; } AParcel(const AIBinder* binder) : AParcel(binder, new ::android::Parcel, true /*owns*/) {} AParcel(const AIBinder* binder) : AParcel(binder, new ::android::Parcel, true /*owns*/) {} AParcel(const AIBinder* binder, ::android::Parcel* parcel, bool owns) AParcel(const AIBinder* binder, ::android::Parcel* parcel, bool owns) Loading
libs/binder/ndk/scripts/gen_parcel_helper.py +2 −2 Original line number Original line Diff line number Diff line Loading @@ -68,7 +68,7 @@ def main(): header += " */\n" header += " */\n" header += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value);\n\n" header += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value);\n\n" source += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value) {\n" source += "binder_status_t AParcel_write" + pretty + "(AParcel* parcel, " + cpp + " value) {\n" source += " status_t status = (*parcel)->write" + pretty + "(value);\n" source += " status_t status = parcel->get()->write" + pretty + "(value);\n" source += " return PruneStatusT(status);\n" source += " return PruneStatusT(status);\n" source += "}\n\n" source += "}\n\n" Loading @@ -78,7 +78,7 @@ def main(): header += " */\n" header += " */\n" header += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value);\n\n" header += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value);\n\n" source += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value) {\n" source += "binder_status_t AParcel_read" + pretty + "(const AParcel* parcel, " + cpp + "* value) {\n" source += " status_t status = (*parcel)->read" + pretty + "(value);\n" source += " status_t status = parcel->get()->read" + pretty + "(value);\n" source += " return PruneStatusT(status);\n" source += " return PruneStatusT(status);\n" source += "}\n\n" source += "}\n\n" Loading