/packages/modules/Connectivity/nearby/tests/cts/fastpair/src/android/nearby/cts/ |
D | DataElementTest.java | 19 import static android.nearby.DataElement.DataType.PRIVATE_IDENTITY; 20 import static android.nearby.DataElement.DataType.PROVISIONED_IDENTITY; 21 import static android.nearby.DataElement.DataType.PUBLIC_IDENTITY; 22 import static android.nearby.DataElement.DataType.SALT; 23 import static android.nearby.DataElement.DataType.TRUSTED_IDENTITY; 24 import static android.nearby.DataElement.DataType.TX_POWER; 28 import android.nearby.DataElement; 51 DataElement dataElement = new DataElement(KEY, VALUE); in testBuilder() 60 DataElement dataElement = new DataElement(KEY, VALUE); in testWriteParcel() 65 DataElement elementFromParcel = DataElement.CREATOR.createFromParcel( in testWriteParcel() [all …]
|
D | PresenceDeviceTest.java | 21 import android.nearby.DataElement; 62 .addExtendedProperty(new DataElement(KEY, VALUE)) in testBuilder() 72 DataElement dataElement = device.getExtendedProperties().get(0); in testBuilder() 89 .addExtendedProperty(new DataElement(KEY, VALUE)) in testWriteParcel() 113 .addExtendedProperty(new DataElement(KEY, VALUE)) in describeContents()
|
D | PresenceBroadcastRequestTest.java | 25 import android.nearby.DataElement; 69 DataElement element = new DataElement(KEY, VALUE); in setUp()
|
D | PresenceScanFilterTest.java | 23 import android.nearby.DataElement; 63 .addExtendedProperty(new DataElement(KEY, VALUE));
|
/packages/modules/Bluetooth/system/profile/sdp/common/ |
D | data_element_reader.h | 34 using DataElement = 44 DataElement ReadNext(); 48 DataElement ParseFail(); 50 DataElement ReadInteger(); 51 DataElement ReadLargeInt(); 54 DataElement ReadSignedInt(DataElementSize size); 55 DataElement ReadUnsignedInt(DataElementSize size); 56 DataElement ReadUuid(DataElementSize size); 57 DataElement ReadString(DataElementSize size); 58 DataElement ReadSequence(DataElementSize size);
|
D | data_element_reader.cc | 41 DataElementReader::DataElement DataElementReader::ReadNext() { in ReadNext() 84 DataElementReader::DataElement DataElementReader::ParseFail() { in ParseFail() 90 DataElementReader::DataElement DataElementReader::ReadInteger() { in ReadInteger() 98 DataElementReader::DataElement DataElementReader::ReadLargeInt() { in ReadLargeInt() 109 DataElementReader::DataElement DataElementReader::ReadSignedInt( in ReadSignedInt() 129 DataElementReader::DataElement DataElementReader::ReadUnsignedInt( in ReadUnsignedInt() 149 DataElementReader::DataElement DataElementReader::ReadUuid( in ReadUuid() 176 DataElementReader::DataElement DataElementReader::ReadString( in ReadString() 208 DataElementReader::DataElement DataElementReader::ReadSequence( in ReadSequence()
|
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/provider/ |
D | ChreDiscoveryProviderTest.java | 32 import android.nearby.DataElement; 219 final List<DataElement> expectedExtendedProperties = new ArrayList<>(); in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 220 expectedExtendedProperties.add(new DataElement(DATA_TYPE_CONNECTION_STATUS_KEY, in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 222 expectedExtendedProperties.add(new DataElement(DATA_TYPE_BATTERY_KEY, batteryStatus)); in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 223 expectedExtendedProperties.add(new DataElement(DATA_TYPE_TX_POWER_KEY, txPower)); in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 225 new DataElement(DATA_TYPE_BLUETOOTH_ADDR_KEY, bluetoothAddr)); in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 227 new DataElement(DATA_TYPE_FP_ACCOUNT_KEY, fastPairAccountKey)); in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 229 new DataElement(DATA_TYPE_BLE_SERVICE_DATA_KEY, new byte[] {1, 2, 3, 4, 5})); in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 246 .addDataElement(Blefilter.DataElement.newBuilder() in testOnNearbyDeviceDiscoveredWithDataElements_TIME() 251 .addDataElement(Blefilter.DataElement.newBuilder() in testOnNearbyDeviceDiscoveredWithDataElements_TIME() [all …]
|
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/presence/ |
D | PresenceDiscoveryResult.java | 22 import android.nearby.DataElement; 75 private final List<DataElement> mExtendedProperties; 84 List<DataElement> extendedProperties, in PresenceDiscoveryResult() 118 boolean accountKeyMatches(List<DataElement> extendedProperties) { in accountKeyMatches() 120 for (DataElement requestedDe : mExtendedProperties) { in accountKeyMatches() 121 if (requestedDe.getKey() != DataElement.DataType.ACCOUNT_KEY_DATA) { in accountKeyMatches() 126 for (DataElement scannedDe : extendedProperties) { in accountKeyMatches() 127 if (scannedDe.getKey() != DataElement.DataType.ACCOUNT_KEY_DATA) { in accountKeyMatches() 143 public List<DataElement> getExtendedProperties() { in getExtendedProperties() 168 private final List<DataElement> mExtendedProperties; [all …]
|
D | ExtendedAdvertisement.java | 27 import android.nearby.DataElement; 28 import android.nearby.DataElement.DataType; 68 private final List<DataElement> mDataElements; 79 List<DataElement> dataElements) { in ExtendedAdvertisement() 116 List<DataElement> dataElements = request.getExtendedProperties(); in createFromRequest() 120 new DataElement(DataType.ACTION, new byte[]{(byte) action})); in createFromRequest() 238 List<DataElement> dataElements = getDataElementsFromBytes(version, otherDataElements); in fromBytes() 303 DataElement saltDe; in toBytesInternal() 308 saltDe = new DataElement(DataType.SALT, mSalt); in toBytesInternal() 312 saltDe = new DataElement(DataType.ENCRYPTION_INFO, in toBytesInternal() [all …]
|
D | PresenceManager.java | 26 import android.nearby.DataElement; 58 List<DataElement> dataElements = presenceDevice.getExtendedProperties(); 59 for (DataElement dataElement : dataElements) { 98 .addExtendedProperty(new DataElement( 99 DataElement.DataType.ACCOUNT_KEY_DATA,
|
D | DataElementHeader.java | 21 import android.nearby.DataElement; 65 @DataElement.DataType 70 @DataElement.DataType int dataType, int dataLength) { in DataElementHeader() 85 @DataElement.DataType
|
D | ExtendedAdvertisementUtils.java | 23 import android.nearby.DataElement; 86 public static byte[] convertDataElementToBytes(DataElement dataElement) { 87 @DataElement.DataType int type = dataElement.getKey();
|
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/provider/ |
D | ChreDiscoveryProvider.java | 32 import android.nearby.DataElement; 187 for (DataElement dataElement : presenceScanFilter.getExtendedProperties()) { in updateFiltersLocked() 188 if (dataElement.getKey() == DataElement.DataType.ACCOUNT_KEY_DATA) { in updateFiltersLocked() 191 && DataElement.isTestDeType(dataElement.getKey())) { in updateFiltersLocked() 217 private Blefilter.DataElement toProtoDataElement(DataElement dataElement) { in toProtoDataElement() 218 return Blefilter.DataElement.newBuilder() in toProtoDataElement() 319 for (Blefilter.DataElement element : filterResult.getDataElementList()) { in onMessageFromNanoApp() 325 new DataElement( in onMessageFromNanoApp() 326 DataElement.DataType.BLE_ADDRESS, in onMessageFromNanoApp() 332 new DataElement( in onMessageFromNanoApp() [all …]
|
/packages/modules/Connectivity/nearby/framework/java/android/nearby/ |
D | DataElement.java | 37 public final class DataElement implements Parcelable { class 118 public DataElement(int key, @NonNull byte[] value) { in DataElement() method in DataElement 125 public static final Creator<DataElement> CREATOR = new Creator<DataElement>() { 127 public DataElement createFromParcel(Parcel in) { 131 return new DataElement(key, value); 135 public DataElement[] newArray(int size) { 136 return new DataElement[size]; 142 if (obj instanceof DataElement) { in equals() 143 return mKey == ((DataElement) obj).mKey in equals() 144 && Arrays.equals(mValue, ((DataElement) obj).mValue); in equals()
|
D | PresenceScanFilter.java | 43 private final List<DataElement> mExtendedProperties; 65 public List<DataElement> getExtendedProperties() { in getExtendedProperties() 70 List<Integer> presenceActions, List<DataElement> extendedProperties) { in PresenceScanFilter() 90 in.readParcelableList(mExtendedProperties, DataElement.class.getClassLoader(), in PresenceScanFilter() 91 DataElement.class); in PresenceScanFilter() 147 private final List<DataElement> mExtendedProperties; 193 public Builder addExtendedProperty(@NonNull DataElement dataElement) { in addExtendedProperty()
|
D | PresenceBroadcastRequest.java | 41 private final List<DataElement> mExtendedProperties; 45 PrivateCredential credential, List<DataElement> extendedProperties) { in PresenceBroadcastRequest() 63 in.readList(mExtendedProperties, DataElement.class.getClassLoader(), DataElement.class); in PresenceBroadcastRequest() 114 public List<DataElement> getExtendedProperties() { in getExtendedProperties() 139 private final List<DataElement> mExtendedProperties; 193 public Builder addExtendedProperty(@NonNull DataElement dataElement) { in addExtendedProperty()
|
D | PresenceDevice.java | 77 private final List<DataElement> mExtendedProperties; 134 public List<DataElement> getExtendedProperties() { in getExtendedProperties() 189 List<DataElement> extendedProperties) { in PresenceDevice() 228 for (DataElement dataElement : mExtendedProperties) { in writeToParcel() 266 List<DataElement> dataElements = new ArrayList<>(); 269 in.readParcelable(DataElement.class.getClassLoader(), DataElement.class)); 297 private final List<DataElement> mExtendedProperties; 406 public Builder addExtendedProperty(@NonNull DataElement dataElement) { in addExtendedProperty()
|
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/presence/ |
D | ExtendedAdvertisementTest.java | 24 import android.nearby.DataElement; 52 private static final DataElement MODE_ID_ADDRESS_ELEMENT = 53 new DataElement(DATA_TYPE_MODEL_ID, MODE_ID_DATA); 54 private static final DataElement BLE_ADDRESS_ELEMENT = 55 new DataElement(DATA_TYPE_BLE_ADDRESS, BLE_ADDRESS); 64 private static final DataElement PRESENCE_ACTION_DE_1 = 65 new DataElement(DATA_TYPE_ACTION, new byte[]{PRESENCE_ACTION_1}); 66 private static final DataElement PRESENCE_ACTION_DE_2 = 67 new DataElement(DATA_TYPE_ACTION, new byte[]{PRESENCE_ACTION_2}); 112 private static final DataElement DE1 = new DataElement(571, ArrayUtils.stringToBytes( [all …]
|
D | PresenceDiscoveryResultTest.java | 21 import android.nearby.DataElement; 99 .addExtendedProperty(new DataElement( in testFromDevice_presenceDeviceAvailable() 122 DataElement accountKey = new DataElement(DATA_TYPE_ACCOUNT_KEY, new byte[]{1, 2, 3, 4}); in testAccountMatches() 126 List<DataElement> extendedProperties = new ArrayList<>(); in testAccountMatches() 127 extendedProperties.add(new DataElement(DATA_TYPE_ACCOUNT_KEY, new byte[]{1, 2, 3, 4})); in testAccountMatches() 128 extendedProperties.add(new DataElement(DATA_TYPE_INTENT, in testAccountMatches()
|
D | PresenceManagerTest.java | 25 import android.nearby.DataElement; 67 DataElement dataElement1 = new DataElement(1, new byte[] {1, 2}); in testDeviceStatusUpdated() 68 DataElement dataElement2 = new DataElement(2, new byte[] {-1, -2, 3, 4, 5, 6, 7, 8, 9}); in testDeviceStatusUpdated()
|
D | ExtendedAdvertisementUtilsTest.java | 22 import android.nearby.DataElement; 77 DataElement salt = new DataElement(DATA_TYPE_SALT, new byte[]{13, 14}); in test_constructDataElement_salt() 91 DataElement identity = new DataElement(DATA_TYPE_PRIVATE_IDENTITY, identityData); in test_constructDataElement_privateIdentity()
|
/packages/modules/Bluetooth/android/pandora/test/ |
D | hfpclient_test.py | 36 DataElement, 239 DataElement.unsigned_integer_32(0x00010001), 243 DataElement.sequence( 245 DataElement.uuid(BT_HANDSFREE_AUDIO_GATEWAY_SERVICE), 246 DataElement.uuid(BT_GENERIC_AUDIO_SERVICE), 252 DataElement.sequence( 254 DataElement.sequence([DataElement.uuid(BT_L2CAP_PROTOCOL_ID)]), 255 DataElement.sequence( 257 DataElement.uuid(BT_RFCOMM_PROTOCOL_ID), 258 DataElement.unsigned_integer_8(rfcomm_channel), [all …]
|
/packages/modules/Bluetooth/system/profile/sdp/common/test/ |
D | data_element_reader_test.cc | 27 using DataElement = DataElementReader::DataElement; typedef 54 DataElement a_elem = a.ReadNext(); in operator ==() 55 DataElement b_elem = b.ReadNext(); in operator ==() 60 if (a_elem == DataElement(std::monostate())) break; in operator ==() 80 using ValidTestParam = std::tuple<std::vector<uint8_t>, DataElement>; 202 ASSERT_EQ(reader.ReadNext(), DataElement(std::monostate())); in TEST_P() 237 ASSERT_EQ(subreader.ReadNext(), DataElement(std::monostate())); in TEST() 246 ASSERT_EQ(reader.ReadNext(), DataElement(std::monostate())); in TEST() 254 ASSERT_EQ(reader.ReadNext(), DataElement(std::monostate())); in TEST() 262 ASSERT_EQ(reader.ReadNext(), DataElement(std::monostate())); in TEST() [all …]
|
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/managers/ |
D | DiscoveryProviderManager.java | 26 import android.nearby.DataElement; 98 List<DataElement> dataElements = in isChreOnly() 100 for (DataElement dataElement : dataElements) { in isChreOnly() 101 if (dataElement.getKey() != DataElement.DataType.SCAN_MODE) { in isChreOnly()
|
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/managers/ |
D | MergedDiscoveryRequestTest.java | 23 import android.nearby.DataElement; 82 action).addExtendedProperty(new DataElement(key, value)).build(); in test_addFilters()
|