Lines Matching refs:val
793 status_t Parcel::writeByteVector(const std::vector<int8_t>& val) { in writeByteVector() argument
794 return writeByteVectorInternal(val.data(), val.size()); in writeByteVector()
797 status_t Parcel::writeByteVector(const std::optional<std::vector<int8_t>>& val) in writeByteVector() argument
799 if (!val) return writeInt32(-1); in writeByteVector()
800 return writeByteVectorInternal(val->data(), val->size()); in writeByteVector()
803 status_t Parcel::writeByteVector(const std::unique_ptr<std::vector<int8_t>>& val) in writeByteVector() argument
805 if (!val) return writeInt32(-1); in writeByteVector()
806 return writeByteVectorInternal(val->data(), val->size()); in writeByteVector()
809 status_t Parcel::writeByteVector(const std::vector<uint8_t>& val) { in writeByteVector() argument
810 return writeByteVectorInternal(reinterpret_cast<const int8_t*>(val.data()), val.size()); in writeByteVector()
813 status_t Parcel::writeByteVector(const std::optional<std::vector<uint8_t>>& val) in writeByteVector() argument
815 if (!val) return writeInt32(-1); in writeByteVector()
816 return writeByteVectorInternal(reinterpret_cast<const int8_t*>(val->data()), val->size()); in writeByteVector()
819 status_t Parcel::writeByteVector(const std::unique_ptr<std::vector<uint8_t>>& val) in writeByteVector() argument
821 if (!val) return writeInt32(-1); in writeByteVector()
822 return writeByteVectorInternal(reinterpret_cast<const int8_t*>(val->data()), val->size()); in writeByteVector()
825 status_t Parcel::writeInt32Vector(const std::vector<int32_t>& val) in writeInt32Vector() argument
827 return writeTypedVector(val, &Parcel::writeInt32); in writeInt32Vector()
830 status_t Parcel::writeInt32Vector(const std::optional<std::vector<int32_t>>& val) in writeInt32Vector() argument
832 return writeNullableTypedVector(val, &Parcel::writeInt32); in writeInt32Vector()
835 status_t Parcel::writeInt32Vector(const std::unique_ptr<std::vector<int32_t>>& val) in writeInt32Vector() argument
837 return writeNullableTypedVector(val, &Parcel::writeInt32); in writeInt32Vector()
840 status_t Parcel::writeInt64Vector(const std::vector<int64_t>& val) in writeInt64Vector() argument
842 return writeTypedVector(val, &Parcel::writeInt64); in writeInt64Vector()
845 status_t Parcel::writeInt64Vector(const std::optional<std::vector<int64_t>>& val) in writeInt64Vector() argument
847 return writeNullableTypedVector(val, &Parcel::writeInt64); in writeInt64Vector()
850 status_t Parcel::writeInt64Vector(const std::unique_ptr<std::vector<int64_t>>& val) in writeInt64Vector() argument
852 return writeNullableTypedVector(val, &Parcel::writeInt64); in writeInt64Vector()
855 status_t Parcel::writeUint64Vector(const std::vector<uint64_t>& val) in writeUint64Vector() argument
857 return writeTypedVector(val, &Parcel::writeUint64); in writeUint64Vector()
860 status_t Parcel::writeUint64Vector(const std::optional<std::vector<uint64_t>>& val) in writeUint64Vector() argument
862 return writeNullableTypedVector(val, &Parcel::writeUint64); in writeUint64Vector()
865 status_t Parcel::writeUint64Vector(const std::unique_ptr<std::vector<uint64_t>>& val) in writeUint64Vector() argument
867 return writeNullableTypedVector(val, &Parcel::writeUint64); in writeUint64Vector()
870 status_t Parcel::writeFloatVector(const std::vector<float>& val) in writeFloatVector() argument
872 return writeTypedVector(val, &Parcel::writeFloat); in writeFloatVector()
875 status_t Parcel::writeFloatVector(const std::optional<std::vector<float>>& val) in writeFloatVector() argument
877 return writeNullableTypedVector(val, &Parcel::writeFloat); in writeFloatVector()
880 status_t Parcel::writeFloatVector(const std::unique_ptr<std::vector<float>>& val) in writeFloatVector() argument
882 return writeNullableTypedVector(val, &Parcel::writeFloat); in writeFloatVector()
885 status_t Parcel::writeDoubleVector(const std::vector<double>& val) in writeDoubleVector() argument
887 return writeTypedVector(val, &Parcel::writeDouble); in writeDoubleVector()
890 status_t Parcel::writeDoubleVector(const std::optional<std::vector<double>>& val) in writeDoubleVector() argument
892 return writeNullableTypedVector(val, &Parcel::writeDouble); in writeDoubleVector()
895 status_t Parcel::writeDoubleVector(const std::unique_ptr<std::vector<double>>& val) in writeDoubleVector() argument
897 return writeNullableTypedVector(val, &Parcel::writeDouble); in writeDoubleVector()
900 status_t Parcel::writeBoolVector(const std::vector<bool>& val) in writeBoolVector() argument
902 return writeTypedVector(val, &Parcel::writeBool); in writeBoolVector()
905 status_t Parcel::writeBoolVector(const std::optional<std::vector<bool>>& val) in writeBoolVector() argument
907 return writeNullableTypedVector(val, &Parcel::writeBool); in writeBoolVector()
910 status_t Parcel::writeBoolVector(const std::unique_ptr<std::vector<bool>>& val) in writeBoolVector() argument
912 return writeNullableTypedVector(val, &Parcel::writeBool); in writeBoolVector()
915 status_t Parcel::writeCharVector(const std::vector<char16_t>& val) in writeCharVector() argument
917 return writeTypedVector(val, &Parcel::writeChar); in writeCharVector()
920 status_t Parcel::writeCharVector(const std::optional<std::vector<char16_t>>& val) in writeCharVector() argument
922 return writeNullableTypedVector(val, &Parcel::writeChar); in writeCharVector()
925 status_t Parcel::writeCharVector(const std::unique_ptr<std::vector<char16_t>>& val) in writeCharVector() argument
927 return writeNullableTypedVector(val, &Parcel::writeChar); in writeCharVector()
930 status_t Parcel::writeString16Vector(const std::vector<String16>& val) in writeString16Vector() argument
932 return writeTypedVector(val, &Parcel::writeString16); in writeString16Vector()
936 const std::optional<std::vector<std::optional<String16>>>& val) in writeString16Vector() argument
938 return writeNullableTypedVector(val, &Parcel::writeString16); in writeString16Vector()
942 const std::unique_ptr<std::vector<std::unique_ptr<String16>>>& val) in writeString16Vector() argument
944 return writeNullableTypedVector(val, &Parcel::writeString16); in writeString16Vector()
948 const std::optional<std::vector<std::optional<std::string>>>& val) { in writeUtf8VectorAsUtf16Vector() argument
949 return writeNullableTypedVector(val, &Parcel::writeUtf8AsUtf16); in writeUtf8VectorAsUtf16Vector()
953 const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& val) { in writeUtf8VectorAsUtf16Vector() argument
954 return writeNullableTypedVector(val, &Parcel::writeUtf8AsUtf16); in writeUtf8VectorAsUtf16Vector()
957 status_t Parcel::writeUtf8VectorAsUtf16Vector(const std::vector<std::string>& val) { in writeUtf8VectorAsUtf16Vector() argument
958 return writeTypedVector(val, &Parcel::writeUtf8AsUtf16); in writeUtf8VectorAsUtf16Vector()
961 status_t Parcel::writeInt32(int32_t val) in writeInt32() argument
963 return writeAligned(val); in writeInt32()
966 status_t Parcel::writeUint32(uint32_t val) in writeUint32() argument
968 return writeAligned(val); in writeUint32()
971 status_t Parcel::writeInt32Array(size_t len, const int32_t *val) { in writeInt32Array() argument
978 if (!val) { in writeInt32Array()
983 ret = write(val, len * sizeof(*val)); in writeInt32Array()
987 status_t Parcel::writeByteArray(size_t len, const uint8_t *val) { in writeByteArray() argument
994 if (!val) { in writeByteArray()
999 ret = write(val, len * sizeof(*val)); in writeByteArray()
1004 status_t Parcel::writeBool(bool val) in writeBool() argument
1006 return writeInt32(int32_t(val)); in writeBool()
1009 status_t Parcel::writeChar(char16_t val) in writeChar() argument
1011 return writeInt32(int32_t(val)); in writeChar()
1014 status_t Parcel::writeByte(int8_t val) in writeByte() argument
1016 return writeInt32(int32_t(val)); in writeByte()
1019 status_t Parcel::writeInt64(int64_t val) in writeInt64() argument
1021 return writeAligned(val); in writeInt64()
1024 status_t Parcel::writeUint64(uint64_t val) in writeUint64() argument
1026 return writeAligned(val); in writeUint64()
1029 status_t Parcel::writePointer(uintptr_t val) in writePointer() argument
1031 return writeAligned<binder_uintptr_t>(val); in writePointer()
1034 status_t Parcel::writeFloat(float val) in writeFloat() argument
1036 return writeAligned(val); in writeFloat()
1041 status_t Parcel::writeDouble(double val) in writeDouble() argument
1047 u.d = val; in writeDouble()
1053 status_t Parcel::writeDouble(double val) in writeDouble() argument
1055 return writeAligned(val); in writeDouble()
1118 status_t Parcel::writeStrongBinder(const sp<IBinder>& val) in writeStrongBinder() argument
1120 return flattenBinder(val); in writeStrongBinder()
1123 status_t Parcel::writeStrongBinderVector(const std::vector<sp<IBinder>>& val) in writeStrongBinderVector() argument
1125 return writeTypedVector(val, &Parcel::writeStrongBinder); in writeStrongBinderVector()
1128 status_t Parcel::writeStrongBinderVector(const std::optional<std::vector<sp<IBinder>>>& val) in writeStrongBinderVector() argument
1130 return writeNullableTypedVector(val, &Parcel::writeStrongBinder); in writeStrongBinderVector()
1133 status_t Parcel::writeStrongBinderVector(const std::unique_ptr<std::vector<sp<IBinder>>>& val) in writeStrongBinderVector() argument
1135 return writeNullableTypedVector(val, &Parcel::writeStrongBinder); in writeStrongBinderVector()
1138 status_t Parcel::readStrongBinderVector(std::optional<std::vector<sp<IBinder>>>* val) const { in readStrongBinderVector()
1139 return readNullableTypedVector(val, &Parcel::readNullableStrongBinder); in readStrongBinderVector()
1142 status_t Parcel::readStrongBinderVector(std::unique_ptr<std::vector<sp<IBinder>>>* val) const { in readStrongBinderVector()
1143 return readNullableTypedVector(val, &Parcel::readNullableStrongBinder); in readStrongBinderVector()
1146 status_t Parcel::readStrongBinderVector(std::vector<sp<IBinder>>* val) const { in readStrongBinderVector()
1147 return readTypedVector(val, &Parcel::readStrongBinder); in readStrongBinderVector()
1236 status_t Parcel::writeUniqueFileDescriptorVector(const std::vector<base::unique_fd>& val) { in writeUniqueFileDescriptorVector() argument
1237 return writeTypedVector(val, &Parcel::writeUniqueFileDescriptor); in writeUniqueFileDescriptorVector()
1240 …t Parcel::writeUniqueFileDescriptorVector(const std::optional<std::vector<base::unique_fd>>& val) { in writeUniqueFileDescriptorVector() argument
1241 return writeNullableTypedVector(val, &Parcel::writeUniqueFileDescriptor); in writeUniqueFileDescriptorVector()
1244 …Parcel::writeUniqueFileDescriptorVector(const std::unique_ptr<std::vector<base::unique_fd>>& val) { in writeUniqueFileDescriptorVector() argument
1245 return writeNullableTypedVector(val, &Parcel::writeUniqueFileDescriptor); in writeUniqueFileDescriptorVector()
1312 status_t Parcel::write(const FlattenableHelperInterface& val) in write() argument
1317 const size_t len = val.getFlattenedSize(); in write()
1318 const size_t fd_count = val.getFdCount(); in write()
1346 err = val.flatten(buf, len, fds, fd_count); in write()
1358 status_t Parcel::writeObject(const flat_binder_object& val, bool nullMetaData) in writeObject() argument
1360 const bool enoughData = (mDataPos+sizeof(val)) <= mDataCapacity; in writeObject()
1364 *reinterpret_cast<flat_binder_object*>(mData+mDataPos) = val; in writeObject()
1367 if (val.hdr.type == BINDER_TYPE_FD) { in writeObject()
1376 if (nullMetaData || val.binder != 0) { in writeObject()
1378 acquire_object(ProcessState::self(), val, this, &mOpenAshmemSize); in writeObject()
1386 const status_t err = growData(sizeof(val)); in writeObject()
1551 status_t Parcel::writeAligned(T val) { in writeAligned() argument
1554 if ((mDataPos+sizeof(val)) <= mDataCapacity) { in writeAligned()
1556 *reinterpret_cast<T*>(mData+mDataPos) = val; in writeAligned()
1557 return finishWrite(sizeof(val)); in writeAligned()
1560 status_t err = growData(sizeof(val)); in writeAligned()
1565 status_t Parcel::readByteVector(std::vector<int8_t>* val) const { in readByteVector()
1567 if (status_t status = reserveOutVector(val, &size); status != OK) return status; in readByteVector()
1568 return readByteVectorInternal(val, size); in readByteVector()
1571 status_t Parcel::readByteVector(std::vector<uint8_t>* val) const { in readByteVector()
1573 if (status_t status = reserveOutVector(val, &size); status != OK) return status; in readByteVector()
1574 return readByteVectorInternal(val, size); in readByteVector()
1577 status_t Parcel::readByteVector(std::optional<std::vector<int8_t>>* val) const { in readByteVector()
1579 if (status_t status = reserveOutVector(val, &size); status != OK) return status; in readByteVector()
1580 if (!*val) { in readByteVector()
1585 return readByteVectorInternal(&**val, size); in readByteVector()
1588 status_t Parcel::readByteVector(std::unique_ptr<std::vector<int8_t>>* val) const { in readByteVector()
1590 if (status_t status = reserveOutVector(val, &size); status != OK) return status; in readByteVector()
1591 if (val->get() == nullptr) { in readByteVector()
1596 return readByteVectorInternal(val->get(), size); in readByteVector()
1599 status_t Parcel::readByteVector(std::optional<std::vector<uint8_t>>* val) const { in readByteVector()
1601 if (status_t status = reserveOutVector(val, &size); status != OK) return status; in readByteVector()
1602 if (!*val) { in readByteVector()
1607 return readByteVectorInternal(&**val, size); in readByteVector()
1610 status_t Parcel::readByteVector(std::unique_ptr<std::vector<uint8_t>>* val) const { in readByteVector()
1612 if (status_t status = reserveOutVector(val, &size); status != OK) return status; in readByteVector()
1613 if (val->get() == nullptr) { in readByteVector()
1618 return readByteVectorInternal(val->get(), size); in readByteVector()
1621 status_t Parcel::readInt32Vector(std::optional<std::vector<int32_t>>* val) const { in readInt32Vector()
1622 return readNullableTypedVector(val, &Parcel::readInt32); in readInt32Vector()
1625 status_t Parcel::readInt32Vector(std::unique_ptr<std::vector<int32_t>>* val) const { in readInt32Vector()
1626 return readNullableTypedVector(val, &Parcel::readInt32); in readInt32Vector()
1629 status_t Parcel::readInt32Vector(std::vector<int32_t>* val) const { in readInt32Vector()
1630 return readTypedVector(val, &Parcel::readInt32); in readInt32Vector()
1633 status_t Parcel::readInt64Vector(std::optional<std::vector<int64_t>>* val) const { in readInt64Vector()
1634 return readNullableTypedVector(val, &Parcel::readInt64); in readInt64Vector()
1637 status_t Parcel::readInt64Vector(std::unique_ptr<std::vector<int64_t>>* val) const { in readInt64Vector()
1638 return readNullableTypedVector(val, &Parcel::readInt64); in readInt64Vector()
1641 status_t Parcel::readInt64Vector(std::vector<int64_t>* val) const { in readInt64Vector()
1642 return readTypedVector(val, &Parcel::readInt64); in readInt64Vector()
1645 status_t Parcel::readUint64Vector(std::optional<std::vector<uint64_t>>* val) const { in readUint64Vector()
1646 return readNullableTypedVector(val, &Parcel::readUint64); in readUint64Vector()
1649 status_t Parcel::readUint64Vector(std::unique_ptr<std::vector<uint64_t>>* val) const { in readUint64Vector()
1650 return readNullableTypedVector(val, &Parcel::readUint64); in readUint64Vector()
1653 status_t Parcel::readUint64Vector(std::vector<uint64_t>* val) const { in readUint64Vector()
1654 return readTypedVector(val, &Parcel::readUint64); in readUint64Vector()
1657 status_t Parcel::readFloatVector(std::optional<std::vector<float>>* val) const { in readFloatVector()
1658 return readNullableTypedVector(val, &Parcel::readFloat); in readFloatVector()
1661 status_t Parcel::readFloatVector(std::unique_ptr<std::vector<float>>* val) const { in readFloatVector()
1662 return readNullableTypedVector(val, &Parcel::readFloat); in readFloatVector()
1665 status_t Parcel::readFloatVector(std::vector<float>* val) const { in readFloatVector()
1666 return readTypedVector(val, &Parcel::readFloat); in readFloatVector()
1669 status_t Parcel::readDoubleVector(std::optional<std::vector<double>>* val) const { in readDoubleVector()
1670 return readNullableTypedVector(val, &Parcel::readDouble); in readDoubleVector()
1673 status_t Parcel::readDoubleVector(std::unique_ptr<std::vector<double>>* val) const { in readDoubleVector()
1674 return readNullableTypedVector(val, &Parcel::readDouble); in readDoubleVector()
1677 status_t Parcel::readDoubleVector(std::vector<double>* val) const { in readDoubleVector()
1678 return readTypedVector(val, &Parcel::readDouble); in readDoubleVector()
1681 status_t Parcel::readBoolVector(std::optional<std::vector<bool>>* val) const { in readBoolVector()
1685 val->reset(); in readBoolVector()
1692 val->emplace(); in readBoolVector()
1694 status = readBoolVector(&**val); in readBoolVector()
1697 val->reset(); in readBoolVector()
1703 status_t Parcel::readBoolVector(std::unique_ptr<std::vector<bool>>* val) const { in readBoolVector()
1707 val->reset(); in readBoolVector()
1714 val->reset(new (std::nothrow) std::vector<bool>()); in readBoolVector()
1716 status = readBoolVector(val->get()); in readBoolVector()
1719 val->reset(); in readBoolVector()
1725 status_t Parcel::readBoolVector(std::vector<bool>* val) const { in readBoolVector()
1737 val->resize(size); in readBoolVector()
1745 (*val)[i] = data; in readBoolVector()
1755 status_t Parcel::readCharVector(std::optional<std::vector<char16_t>>* val) const { in readCharVector()
1756 return readNullableTypedVector(val, &Parcel::readChar); in readCharVector()
1759 status_t Parcel::readCharVector(std::unique_ptr<std::vector<char16_t>>* val) const { in readCharVector()
1760 return readNullableTypedVector(val, &Parcel::readChar); in readCharVector()
1763 status_t Parcel::readCharVector(std::vector<char16_t>* val) const { in readCharVector()
1764 return readTypedVector(val, &Parcel::readChar); in readCharVector()
1768 std::optional<std::vector<std::optional<String16>>>* val) const { in readString16Vector()
1769 return readNullableTypedVector(val, &Parcel::readString16); in readString16Vector()
1773 std::unique_ptr<std::vector<std::unique_ptr<String16>>>* val) const { in readString16Vector()
1774 return readNullableTypedVector(val, &Parcel::readString16); in readString16Vector()
1777 status_t Parcel::readString16Vector(std::vector<String16>* val) const { in readString16Vector()
1778 return readTypedVector(val, &Parcel::readString16); in readString16Vector()
1782 std::optional<std::vector<std::optional<std::string>>>* val) const { in readUtf8VectorFromUtf16Vector()
1783 return readNullableTypedVector(val, &Parcel::readUtf8FromUtf16); in readUtf8VectorFromUtf16Vector()
1787 std::unique_ptr<std::vector<std::unique_ptr<std::string>>>* val) const { in readUtf8VectorFromUtf16Vector()
1788 return readNullableTypedVector(val, &Parcel::readUtf8FromUtf16); in readUtf8VectorFromUtf16Vector()
1791 status_t Parcel::readUtf8VectorFromUtf16Vector(std::vector<std::string>* val) const { in readUtf8VectorFromUtf16Vector()
1792 return readTypedVector(val, &Parcel::readUtf8FromUtf16); in readUtf8VectorFromUtf16Vector()
2143 status_t Parcel::readStrongBinder(sp<IBinder>* val) const in readStrongBinder()
2145 status_t status = readNullableStrongBinder(val); in readStrongBinder()
2146 if (status == OK && !val->get()) { in readStrongBinder()
2152 status_t Parcel::readNullableStrongBinder(sp<IBinder>* val) const in readNullableStrongBinder()
2154 return unflattenBinder(val); in readNullableStrongBinder()
2159 sp<IBinder> val; in readStrongBinder() local
2163 readNullableStrongBinder(&val); in readStrongBinder()
2164 return val; in readStrongBinder()
2263 status_t Parcel::readUniqueFileDescriptor(base::unique_fd* val) const in readUniqueFileDescriptor()
2271 val->reset(fcntl(got, F_DUPFD_CLOEXEC, 0)); in readUniqueFileDescriptor()
2273 if (val->get() < 0) { in readUniqueFileDescriptor()
2280 status_t Parcel::readUniqueParcelFileDescriptor(base::unique_fd* val) const in readUniqueParcelFileDescriptor()
2288 val->reset(fcntl(got, F_DUPFD_CLOEXEC, 0)); in readUniqueParcelFileDescriptor()
2290 if (val->get() < 0) { in readUniqueParcelFileDescriptor()
2297 status_t Parcel::readUniqueFileDescriptorVector(std::optional<std::vector<base::unique_fd>>* val) c… in readUniqueFileDescriptorVector()
2298 return readNullableTypedVector(val, &Parcel::readUniqueFileDescriptor); in readUniqueFileDescriptorVector()
2301 status_t Parcel::readUniqueFileDescriptorVector(std::unique_ptr<std::vector<base::unique_fd>>* val)… in readUniqueFileDescriptorVector()
2302 return readNullableTypedVector(val, &Parcel::readUniqueFileDescriptor); in readUniqueFileDescriptorVector()
2305 status_t Parcel::readUniqueFileDescriptorVector(std::vector<base::unique_fd>* val) const { in readUniqueFileDescriptorVector()
2306 return readTypedVector(val, &Parcel::readUniqueFileDescriptor); in readUniqueFileDescriptorVector()
2346 status_t Parcel::read(FlattenableHelperInterface& val) const in read()
2387 err = val.unflatten(buf, len, fds, fd_count); in read()