Home
last modified time | relevance | path

Searched refs:val (Results 1 – 25 of 394) sorted by relevance

12345678910>>...16

/packages/modules/AppSearch/framework/java/android/app/appsearch/safeparcel/
DSafeParcelWriter.java91 public static void writeBoolean(@NonNull Parcel p, int id, boolean val) { in writeBoolean() argument
93 p.writeInt(val ? 1 : 0); in writeBoolean()
98 @NonNull Parcel p, int id, @Nullable Boolean val, boolean writeNull) { in writeBooleanObject() argument
99 if (val == null) { in writeBooleanObject()
107 p.writeInt(val ? 1 : 0); in writeBooleanObject()
111 public static void writeByte(@NonNull Parcel p, int id, byte val) { in writeByte() argument
113 p.writeInt(val); in writeByte()
117 public static void writeChar(@NonNull Parcel p, int id, char val) { in writeChar() argument
119 p.writeInt(val); in writeChar()
123 public static void writeShort(@NonNull Parcel p, int id, short val) { in writeShort() argument
[all …]
/packages/modules/Bluetooth/system/gd/discovery/device/
Dbt_property.cc67 (const char*)property.val); in bt_property_text()
72 ((const RawAddress*)property.val)->ToString().c_str()); in bt_property_text()
75 const bluetooth::Uuid* it = (const bluetooth::Uuid*)property.val; in bt_property_text()
86 *(uint32_t*)(property.val)); in bt_property_text()
92 *(uint32_t*)(property.val)); in bt_property_text()
98 (((bt_service_record_t*)property.val)->uuid).ToString().c_str(), in bt_property_text()
99 (((bt_service_record_t*)property.val)->channel), in bt_property_text()
100 (((bt_service_record_t*)property.val)->name)); in bt_property_text()
106 *((bt_scan_mode_t*)property.val)); in bt_property_text()
110 const RawAddress* it = (const RawAddress*)property.val; in bt_property_text()
[all …]
Dbt_property_unittest.cc287 ASSERT_STREQ((const char*)kBdName, (const char*)property.val); in verify_property()
292 ASSERT_EQ(kRawAddress, *((RawAddress*)property.val)); in verify_property()
297 const bluetooth::Uuid* uuid = (const bluetooth::Uuid*)property.val; in verify_property()
305 ASSERT_EQ(kClassOfDevice, *((uint32_t*)property.val)); in verify_property()
310 ASSERT_EQ(kTypeOfDevice, *((uint32_t*)property.val)); in verify_property()
315 ASSERT_EQ(kServiceRecord.uuid, ((bt_service_record_t*)property.val)->uuid); in verify_property()
316 ASSERT_EQ(kServiceRecord.channel, ((bt_service_record_t*)property.val)->channel); in verify_property()
317 ASSERT_STREQ(kServiceRecord.name, ((bt_service_record_t*)property.val)->name); in verify_property()
322 ASSERT_EQ(kAdapterScanMode, *((bt_scan_mode_t*)property.val)); in verify_property()
327 const RawAddress* raw_address = static_cast<RawAddress*>(property.val); in verify_property()
[all …]
/packages/modules/Bluetooth/system/gd/rust/topshim/src/
Dutils.rs53 pub(crate) fn from_ref(val: &'a T) -> Self { in from_ref()
54 Self { ptr: val, _covariant: PhantomData } in from_ref()
70 fn from(val: &'a [T]) -> Self { in from()
71 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
76 fn from(val: &'a Vec<T>) -> Self { in from()
77 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
82 fn from(val: &'a String) -> Self { in from()
83 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
88 fn from(val: &'a CString) -> Self { in from()
89 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
[all …]
/packages/modules/NetworkStack/src/android/net/apf/
DApfV4GeneratorBase.java160 public final Type addAdd(long val) { in addAdd() argument
161 if (val == 0) return self(); // nop, as APFv6 would '+= R1' in addAdd()
162 return append(new Instruction(Opcodes.ADD).addTwosCompUnsigned(val)); in addAdd()
168 public final Type addSub(long val) { in addSub() argument
169 return addAdd(-val); // note: addSub(4 billion) isn't valid, as addAdd(-4 billion) isn't in addSub()
175 public final Type addMul(long val) { in addMul() argument
176 if (val == 0) return addLoadImmediate(R0, 0); // equivalent, as APFv6 would '*= R1' in addMul()
177 return append(new Instruction(Opcodes.MUL).addUnsigned(val)); in addMul()
183 public final Type addDiv(long val) { in addDiv() argument
184 if (val == 0) return addPass(); // equivalent, as APFv6 would '/= R1' in addDiv()
[all …]
DApfV4Generator.java115 public ApfV4Generator addCountAndDropIfR0Equals(long val, ApfCounterTracker.Counter cnt) { in addCountAndDropIfR0Equals() argument
117 return maybeAddLoadCounterOffset(R1, cnt).addJumpIfR0Equals(val, mCountAndDropLabel); in addCountAndDropIfR0Equals()
121 public ApfV4Generator addCountAndPassIfR0Equals(long val, ApfCounterTracker.Counter cnt) { in addCountAndPassIfR0Equals() argument
123 return maybeAddLoadCounterOffset(R1, cnt).addJumpIfR0Equals(val, mCountAndPassLabel); in addCountAndPassIfR0Equals()
127 public ApfV4Generator addCountAndDropIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) { in addCountAndDropIfR0NotEquals() argument
129 return maybeAddLoadCounterOffset(R1, cnt).addJumpIfR0NotEquals(val, mCountAndDropLabel); in addCountAndDropIfR0NotEquals()
133 public ApfV4Generator addCountAndPassIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) { in addCountAndPassIfR0NotEquals() argument
135 return maybeAddLoadCounterOffset(R1, cnt).addJumpIfR0NotEquals(val, mCountAndPassLabel); in addCountAndPassIfR0NotEquals()
139 public ApfV4Generator addCountAndDropIfR0AnyBitsSet(long val, ApfCounterTracker.Counter cnt) { in addCountAndDropIfR0AnyBitsSet() argument
141 return maybeAddLoadCounterOffset(R1, cnt).addJumpIfR0AnyBitsSet(val, mCountAndDropLabel); in addCountAndDropIfR0AnyBitsSet()
[all …]
DApfV6GeneratorBase.java177 public final Type addWriteU8(int val) { in addWriteU8() argument
178 return append(new Instruction(Opcodes.WRITE).overrideImmSize(1).addU8(val)); in addWriteU8()
184 public final Type addWriteU16(int val) { in addWriteU16() argument
185 return append(new Instruction(Opcodes.WRITE).overrideImmSize(2).addU16(val)); in addWriteU16()
191 public final Type addWriteU32(long val) { in addWriteU32() argument
192 return append(new Instruction(Opcodes.WRITE).overrideImmSize(4).addU32(val)); in addWriteU32()
198 public final Type addWrite32(int val) { in addWrite32() argument
199 return addWriteU32((long) val & 0xffffffffL); in addWrite32()
609 public final Type addCountAndDropIfR0Equals(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0Equals() argument
612 return addJumpIfR0NotEquals(val, tgt).addCountAndDrop(cnt).defineLabel(tgt); in addCountAndDropIfR0Equals()
[all …]
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/
DImageUtils.cpp50 int val = (int) (REDY * r + GREENY * g + BLUEY * b) / 1000 + 16; in rgba2yvu() local
51 if (val < 0) val = 0; in rgba2yvu()
52 if (val > 255) val = 255; in rgba2yvu()
53 *(yimg) = val; in rgba2yvu()
55 val = (int) (REDV * r - GREENV * g - BLUEV * b) / 1000 + 128; in rgba2yvu()
56 if (val < 0) val = 0; in rgba2yvu()
57 if (val > 255) val = 255; in rgba2yvu()
58 *(vimg) = val; in rgba2yvu()
60 val = (int) (-REDU * r - GREENU * g + BLUEU * b) / 1000 + 128; in rgba2yvu()
61 if (val < 0) val = 0; in rgba2yvu()
[all …]
/packages/services/Car/tools/telemetry/lua-interpreter/
Djson.lua32 local function encode_nil(val)
37 local function encode_table(val, stack)
42 if stack[val] then error("circular reference") end
44 stack[val] = true
46 if rawget(val, 1) ~= nil or next(val) == nil then
49 for k in pairs(val) do
55 if n ~= #val then
59 for i, v in ipairs(val) do
62 stack[val] = nil
67 for k, v in pairs(val) do
[all …]
/packages/services/Car/car-lib/src/com/android/car/internal/util/
DArrayUtils.java434 public static int[] appendInt(@Nullable int[] cur, int val, in appendInt() argument
437 return new int[]{val}; in appendInt()
442 if (cur[i] == val) { in appendInt()
449 ret[n] = val; in appendInt()
458 public static int[] appendInt(@Nullable int[] cur, int val) { in appendInt() argument
459 return appendInt(cur, val, false); in appendInt()
466 public static int[] removeInt(@Nullable int[] cur, int val) { in removeInt() argument
472 if (cur[i] == val) { in removeInt()
490 public static String[] removeString(@Nullable String[] cur, String val) { in removeString() argument
496 if (Objects.equals(cur[i], val)) { in removeString()
[all …]
/packages/modules/Bluetooth/system/btcore/src/
Dproperty.cc33 static bt_property_t* property_new_(void* val, size_t len,
44 clone[i].val = osi_calloc(clone[i].len); in property_copy_array()
45 memcpy(clone[i].val, properties[i].val, clone[i].len); in property_copy_array()
78 return strlen((const char*)longer->val) == (size_t)shorter->len && in property_equals()
79 !memcmp(longer->val, shorter->val, shorter->len); in property_equals()
82 return p1->len == p2->len && !memcmp(p1->val, p2->val, p1->len); in property_equals()
133 osi_free(properties[i].val); in property_free_array()
183 return (const RawAddress*)property->val; in property_as_addr()
190 return (const bt_device_class_t*)property->val; in property_as_device_class()
196 return *(const bt_device_type_t*)property->val; in property_as_device_type()
[all …]
/packages/modules/Bluetooth/system/btif/src/
Dbtif_storage.cc143 strncpy(value, (char*)prop->val, name_length); in prop2cfg()
154 strncpy(value, (char*)prop->val, prop->len); in prop2cfg()
160 BTIF_STORAGE_KEY_SCANMODE, *(int*)prop->val); in prop2cfg()
164 BTIF_STORAGE_KEY_DISC_TIMEOUT, *(int*)prop->val); in prop2cfg()
167 btif_config_set_int(bdstr, BTIF_STORAGE_KEY_DEV_CLASS, *(int*)prop->val); in prop2cfg()
170 btif_config_set_int(bdstr, BTIF_STORAGE_KEY_DEV_TYPE, *(int*)prop->val); in prop2cfg()
173 std::string val; in prop2cfg() local
176 val += (reinterpret_cast<Uuid*>(prop->val) + i)->ToString() + " "; in prop2cfg()
178 btif_config_set_str(bdstr, BTIF_STORAGE_KEY_REMOTE_SERVICE, val); in prop2cfg()
182 bt_remote_version_t* info = (bt_remote_version_t*)prop->val; in prop2cfg()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/
DAdapterProperties.java977 byte[] val; in adapterPropertyChangedCallback()
979 val = values[i]; in adapterPropertyChangedCallback()
981 infoLog("adapterPropertyChangedCallback with type:" + type + " len:" + val.length); in adapterPropertyChangedCallback()
985 mName = new String(val); in adapterPropertyChangedCallback()
997 mAddress = val; in adapterPropertyChangedCallback()
1009 if (val == null || val.length != 3) { in adapterPropertyChangedCallback()
1014 ((int) val[0] << 16) + ((int) val[1] << 8) + (int) val[2]; in adapterPropertyChangedCallback()
1021 int mode = Utils.byteArrayToInt(val, 0); in adapterPropertyChangedCallback()
1031 mUuids = Utils.byteArrayToUuid(val); in adapterPropertyChangedCallback()
1034 int number = val.length / BD_ADDR_LEN; in adapterPropertyChangedCallback()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/
DBidirectionalSparseIntArrayTest.java32 int val = 1000; in testGetKey() local
34 BidirectionalSparseIntArray.create(new int[]{key, val}); in testGetKey()
36 assertThat(intArr.getKey(val, /* defaultKey= */ SOME_DEFAULT_KEY)).isEqualTo(key); in testGetKey()
42 int val = 1000; in testGetValue() local
44 BidirectionalSparseIntArray.create(new int[]{key, val}); in testGetValue()
46 assertThat(intArr.getValue(key, /* defaultValue= */ SOME_DEFAULT_VALUE)).isEqualTo(val); in testGetValue()
52 int val = 100; in testGetKey_returnsDefaultKeyForNonexistentKey() local
54 BidirectionalSparseIntArray.create(new int[]{key, val}); in testGetKey_returnsDefaultKeyForNonexistentKey()
56 assertThat(intArr.getKey(val + 1, SOME_DEFAULT_KEY)).isEqualTo(SOME_DEFAULT_KEY); in testGetKey_returnsDefaultKeyForNonexistentKey()
62 int val = 100; in testGetValue_returnsDefaultValueForNonexistentValue() local
[all …]
/packages/apps/Car/RotaryController/src/com/android/car/rotary/
DDumpUtils.java47 int val; in writeFocusDirection() local
50 val = RotaryProtos.FOCUS_LEFT; in writeFocusDirection()
53 val = RotaryProtos.FOCUS_UP; in writeFocusDirection()
56 val = RotaryProtos.FOCUS_RIGHT; in writeFocusDirection()
59 val = RotaryProtos.FOCUS_DOWN; in writeFocusDirection()
64 dumpOutputStream.write(fieldName, fieldId, val); in writeFocusDirection()
86 int val; in writeAfterScrollAction() local
89 val = RotaryProtos.AFTER_SCROLL_DO_NOTHING; in writeAfterScrollAction()
92 val = RotaryProtos.AFTER_SCROLL_FOCUS_PREVIOUS; in writeAfterScrollAction()
95 val = RotaryProtos.AFTER_SCROLL_FOCUS_NEXT; in writeAfterScrollAction()
[all …]
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsPacketReader.java104 byte val = buf[pos++]; in readUInt8()
105 return val & 0xFF; in readUInt8()
116 int val = (buf[pos++] & 0xFF) << 8; in readUInt16() local
117 val |= (buf[pos++]) & 0xFF; in readUInt16()
118 return val; in readUInt16()
129 long val = (long) (buf[pos++] & 0xFF) << 24; in readUInt32() local
130 val |= (long) (buf[pos++] & 0xFF) << 16; in readUInt32()
131 val |= (long) (buf[pos++] & 0xFF) << 8; in readUInt32()
132 val |= buf[pos++] & 0xFF; in readUInt32()
133 return val; in readUInt32()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/
DObexAppParameters.java50 byte[] val = new byte[len]; in ObexAppParameters()
52 System.arraycopy(raw, i, val, 0, len); in ObexAppParameters()
53 this.add(tag, val); in ObexAppParameters()
103 public void add(byte tag, byte val) { in add() argument
104 byte[] bval = ByteBuffer.allocate(1).put(val).array(); in add()
108 public void add(byte tag, short val) { in add() argument
109 byte[] bval = ByteBuffer.allocate(2).putShort(val).array(); in add()
113 public void add(byte tag, int val) { in add() argument
114 byte[] bval = ByteBuffer.allocate(4).putInt(val).array(); in add()
118 public void add(byte tag, long val) { in add() argument
[all …]
/packages/modules/Bluetooth/system/gd/os/
Dhandler_unittest.cc51 int val = 0; in TEST_F() local
55 [](int* val, std::promise<void> closure_ran) { in TEST_F() argument
56 *val = *val + 1; in TEST_F()
59 common::Unretained(&val), in TEST_F()
63 ASSERT_EQ(val, 1); in TEST_F()
68 int val = 0; in TEST_F() local
76 [](int* val, in TEST_F()
81 *val = *val + 1; in TEST_F()
85 common::Unretained(&val), in TEST_F()
94 ASSERT_EQ(val, 1); in TEST_F()
/packages/modules/Bluetooth/system/btcore/test/
Dproperty_test.cc35 EXPECT_EQ(addr0.address[0], ((uint8_t*)property->val)[0]); in TEST_F()
36 EXPECT_EQ(addr0.address[1], ((uint8_t*)property->val)[1]); in TEST_F()
37 EXPECT_EQ(addr0.address[2], ((uint8_t*)property->val)[2]); in TEST_F()
38 EXPECT_EQ(addr0.address[3], ((uint8_t*)property->val)[3]); in TEST_F()
39 EXPECT_EQ(addr0.address[4], ((uint8_t*)property->val)[4]); in TEST_F()
40 EXPECT_EQ(addr0.address[5], ((uint8_t*)property->val)[5]); in TEST_F()
54 EXPECT_EQ(dc0._[0], ((uint8_t*)property->val)[0]); in TEST_F()
55 EXPECT_EQ(dc0._[1], ((uint8_t*)property->val)[1]); in TEST_F()
56 EXPECT_EQ(dc0._[2], ((uint8_t*)property->val)[2]); in TEST_F()
71 EXPECT_EQ((int)dt0, *(int*)property->val); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/bta/ag/
Dbta_ag_cmd.cc605 tBTA_AG_VAL val = {}; in bta_ag_at_hsp_cback() local
606 val.hdr.handle = bta_ag_scb_to_idx(p_scb); in bta_ag_at_hsp_cback()
607 val.hdr.app_id = p_scb->app_id; in bta_ag_at_hsp_cback()
608 val.num = (uint16_t)int_arg; in bta_ag_at_hsp_cback()
610 if ((p_end - p_arg + 1) >= (long)sizeof(val.str)) { in bta_ag_at_hsp_cback()
615 strlcpy(val.str, p_arg, sizeof(val.str)); in bta_ag_at_hsp_cback()
622 (*bta_ag_cb.p_cback)(event, (tBTA_AG*)&val); in bta_ag_at_hsp_cback()
688 static bool bta_ag_parse_bind_set(tBTA_AG_SCB* p_scb, tBTA_AG_VAL val) { in bta_ag_parse_bind_set() argument
689 char* p_token = strtok(val.str, ","); in bta_ag_parse_bind_set()
797 static bool bta_ag_parse_biev_response(tBTA_AG_SCB* p_scb, tBTA_AG_VAL* val) { in bta_ag_parse_biev_response() argument
[all …]
/packages/services/Car/libs/vehicle-hal-support-lib/src/com/android/car/hal/test/
DHidlVehiclePropValueBuilder.java79 for (int val : values) { in addIntValue()
80 mPropValue.value.int32Values.add(val); in addIntValue()
87 for (float val : values) { in addFloatValue()
88 mPropValue.value.floatValues.add(val); in addFloatValue()
95 for (byte val : values) { in addByteValue()
96 mPropValue.value.bytes.add(val); in addByteValue()
103 for (long val : values) { in setInt64Value()
104 mPropValue.value.int64Values.add(val); in setInt64Value()
117 public HidlVehiclePropValueBuilder setStringValue(String val) { in setStringValue() argument
118 mPropValue.value.stringValue = val; in setStringValue()
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DXmlUtilHelper.java202 public static final void writeMapXml(Map val, OutputStream out) in writeMapXml() argument
208 writeMapXml(val, null, serializer); in writeMapXml()
224 public static final void writeListXml(List val, OutputStream out) in writeListXml() argument
231 writeListXml(val, null, serializer); in writeListXml()
249 public static final void writeMapXml(Map val, String name, XmlSerializer out) in writeMapXml() argument
251 writeMapXml(val, name, out, null); in writeMapXml()
271 public static final void writeMapXml(Map val, String name, XmlSerializer out, in writeMapXml() argument
274 if (val == null) { in writeMapXml()
285 writeMapXml(val, out, callback); in writeMapXml()
305 public static final void writeMapXml(Map val, XmlSerializer out, in writeMapXml() argument
[all …]
/packages/modules/AppSearch/testing/safeparceltests/src/android/app/appsearch/safeparcel/
DSafeParcelableTest.java135 boolean val = true; in testReadWriteBoolean()
136 SafeParcelWriter.writeBoolean(mParcel, TEST_ID, val); in testReadWriteBoolean()
142 assertEquals(val, readVal); in testReadWriteBoolean()
147 Boolean val = true; in testReadWriteBooleanObject() local
148 SafeParcelWriter.writeBooleanObject(mParcel, TEST_ID, val, false); in testReadWriteBooleanObject()
154 assertEquals(val, readVal); in testReadWriteBooleanObject()
176 byte val = 23; in testReadWriteByte()
177 SafeParcelWriter.writeByte(mParcel, TEST_ID, val); in testReadWriteByte()
183 assertEquals(val, readVal); in testReadWriteByte()
188 char val = 'm'; in testReadWriteChar() local
[all …]
/packages/modules/AdServices/adservices/framework/java/android/adservices/topics/
DGetTopicsResult.java308 private static void writeLongList(@NonNull Parcel out, @Nullable List<Long> val) { in writeLongList() argument
309 if (val == null) { in writeLongList()
313 out.writeInt(val.size()); in writeLongList()
314 for (Long l : val) { in writeLongList()
320 private static void writeIntegerList(@NonNull Parcel out, @Nullable List<Integer> val) { in writeIntegerList() argument
321 if (val == null) { in writeIntegerList()
325 out.writeInt(val.size()); in writeIntegerList()
326 for (Integer integer : val) { in writeIntegerList()
332 private static void writeStringList(@NonNull Parcel out, @Nullable List<String> val) { in writeStringList() argument
333 if (val == null) { in writeStringList()
[all …]
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/
DLog.cpp116 LogEntry& LogEntry::arg(const std::string& val) { in arg() argument
117 mArgs.push_back(val.empty() ? "\"\"" : val); in arg()
122 LogEntry& LogEntry::arg<>(bool val) { in arg() argument
123 mArgs.push_back(val ? "true" : "false"); in arg()
127 LogEntry& LogEntry::arg(const std::vector<int32_t>& val) { in arg() argument
128 mArgs.push_back(StringPrintf("[%s]", Join(val, ", ").c_str())); in arg()
132 LogEntry& LogEntry::arg(const std::vector<uint8_t>& val) { in arg() argument
133 mArgs.push_back('{' + toHex(makeSlice(val)) + '}'); in arg()
137 LogEntry& LogEntry::arg(const std::vector<std::string>& val) { in arg() argument
138 mArgs.push_back(StringPrintf("[%s]", Join(val, ", ").c_str())); in arg()

12345678910>>...16