Home
last modified time | relevance | path

Searched refs:KEY (Results 1 – 25 of 294) sorted by relevance

12345678910>>...12

/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/
DObexAppParametersTest.java37 private static final byte KEY = 0x12; field in ObexAppParametersTest
45 KEY, length, 0x12, 0x34, 0x56, 0x78, 0x66 in constructorWithByteArrays_withOneInvalidElement()
49 assertThat(params.exists(KEY)).isTrue(); in constructorWithByteArrays_withOneInvalidElement()
52 assertThat(params.getByteArray(KEY)).isEqualTo(expected); in constructorWithByteArrays_withOneInvalidElement()
60 KEY, length, 0x12, 0x34, 0x56, 0x78, 0x66, 0x77 in constructorWithByteArrays_withTwoInvalidElements()
64 assertThat(params.exists(KEY)).isTrue(); in constructorWithByteArrays_withTwoInvalidElements()
67 assertThat(params.getByteArray(KEY)).isEqualTo(expected); in constructorWithByteArrays_withTwoInvalidElements()
73 byte[] byteArray = new byte[] {KEY, length, 0x12, 0x34, 0x56, 0x78}; in fromHeaderSet()
82 assertThat(params.getByteArray(KEY)).isEqualTo(expected); in fromHeaderSet()
88 byte[] byteArray = new byte[] {KEY, length, 0x12, 0x34, 0x56, 0x78}; in addToHeaderSet()
[all …]
/packages/modules/Virtualization/libs/bssl/tests/
Dhmac_test.rs23 const KEY: &[u8; 20] = &[0x0b; 20]; in rfc4231_test_case_1() constant
30 assert_eq!(HMAC_SHA256, hmac_sha256(KEY, DATA)?); in rfc4231_test_case_1()
36 const KEY: &[u8] = b"Jefe"; in rfc4231_test_case_2() constant
43 assert_eq!(HMAC_SHA256, hmac_sha256(KEY, DATA)?); in rfc4231_test_case_2()
49 const KEY: &[u8; 20] = &[0xaa; 20]; in rfc4231_test_case_3() constant
56 assert_eq!(HMAC_SHA256, hmac_sha256(KEY, DATA)?); in rfc4231_test_case_3()
62 const KEY: &[u8; 25] = &[ in rfc4231_test_case_4() constant
72 assert_eq!(HMAC_SHA256, hmac_sha256(KEY, DATA)?); in rfc4231_test_case_4()
79 const KEY: &[u8; 20] = &[0x0c; 20]; in rfc4231_test_case_5() constant
85 let res = hmac_sha256(KEY, DATA)?; in rfc4231_test_case_5()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DJsonUtilsTest.java31 private static final String KEY = "key"; field in JsonUtilsTest
37 JSONObject jsonObject = new JSONObject().put(KEY, VALID_VALUE); in testGetStringFromJsonSuccess()
39 assertEquals(getStringFromJson(jsonObject, KEY), VALID_VALUE); in testGetStringFromJsonSuccess()
52 JSONObject jsonObject = new JSONObject().put(KEY, VALID_VALUE); in testGetStringFromJsonThrowsJSONExceptionWhenKeyDoesNotExist()
55 String.format(VALUE_NOT_A_STRING, KEY + "otherValue"), in testGetStringFromJsonThrowsJSONExceptionWhenKeyDoesNotExist()
58 getStringFromJson(jsonObject, KEY + "otherValue"); in testGetStringFromJsonThrowsJSONExceptionWhenKeyDoesNotExist()
64 JSONObject jsonObject = new JSONObject().put(KEY, 1); in testGetStringFromJsonThrowsJSONExceptionWhenValueIsNotString()
67 String.format(VALUE_NOT_A_STRING, KEY), in testGetStringFromJsonThrowsJSONExceptionWhenValueIsNotString()
70 getStringFromJson(jsonObject, KEY); in testGetStringFromJsonThrowsJSONExceptionWhenValueIsNotString()
89 JSONObject jsonObject = new JSONObject().put(KEY, 1); in testGetStringFromJsonThrowsJSONExceptionWhenValueIsNotStringCustomError()
[all …]
/packages/apps/TV/tests/unit/src/com/android/tv/util/images/
DImageCacheTest.java36 private static final String KEY = "same"; field in ImageCacheTest
37 private static final ScaledBitmapInfo INFO_200 = createScaledBitmapInfo(KEY, ORIG, 200, 200);
38 private static final ScaledBitmapInfo INFO_100 = createScaledBitmapInfo(KEY, ORIG, 100, 100);
39 private static final ScaledBitmapInfo INFO_50 = createScaledBitmapInfo(KEY, ORIG, 50, 50);
40 private static final ScaledBitmapInfo INFO_25 = createScaledBitmapInfo(KEY, ORIG, 25, 25);
55 assertWithMessage("before").that(mImageCache.get(KEY)).isSameInstanceAs(INFO_50); in testPutIfLarger_smaller()
58 assertWithMessage("after").that(mImageCache.get(KEY)).isSameInstanceAs(INFO_50); in testPutIfLarger_smaller()
64 assertWithMessage("before").that(mImageCache.get(KEY)).isSameInstanceAs(INFO_50); in testPutIfLarger_larger()
67 assertWithMessage("after").that(mImageCache.get(KEY)).isSameInstanceAs(INFO_100); in testPutIfLarger_larger()
74 assertWithMessage("before").that(mImageCache.get(KEY)).isSameInstanceAs(INFO_100); in testPutIfLarger_alreadyMax()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/slices/
DSliceDataTest.java31 private static final String KEY = "KEY"; field in SliceDataTest
46 .setKey(KEY) in testBuilder_buildsMatchingObject()
61 assertThat(data.getKey()).isEqualTo(KEY); in testBuilder_buildsMatchingObject()
91 .setKey(KEY) in testBuilder_noTitle_throwsIllegalStateException()
104 .setKey(KEY) in testBuilder_noFragment_throwsIllegalStateException()
117 .setKey(KEY) in testBuilder_noPrefController_throwsIllegalStateException()
130 .setKey(KEY) in testBuilder_noSubtitle_buildsMatchingObject()
140 assertThat(data.getKey()).isEqualTo(KEY); in testBuilder_noSubtitle_buildsMatchingObject()
153 .setKey(KEY) in testBuilder_noScreenTitle_buildsMatchingObject()
163 assertThat(data.getKey()).isEqualTo(KEY); in testBuilder_noScreenTitle_buildsMatchingObject()
[all …]
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/network/telephony/
DCarrierConfigManagerExtTest.kt45 on { getConfigForSubId(any(), eq(KEY)) } doReturn persistableBundleOf(KEY to VALUE) in safeGetConfig_managerReturnKeyValue_returnNonEmptyBundle()
49 val bundle = carrierConfigManager.safeGetConfig(listOf(KEY)) in safeGetConfig_managerReturnKeyValue_returnNonEmptyBundle()
51 assertThat(bundle.getString(KEY)).isEqualTo(VALUE) in safeGetConfig_managerReturnKeyValue_returnNonEmptyBundle()
57 on { getConfigForSubId(any(), eq(KEY)) } doThrow IllegalStateException() in safeGetConfig_managerThrowIllegalStateException_returnEmptyBundle()
61 val bundle = carrierConfigManager.safeGetConfig(listOf(KEY)) in safeGetConfig_managerThrowIllegalStateException_returnEmptyBundle()
63 assertThat(bundle.containsKey(KEY)).isFalse() in safeGetConfig_managerThrowIllegalStateException_returnEmptyBundle()
67 const val KEY = "key" constant
/packages/modules/Connectivity/nearby/tests/cts/fastpair/src/android/nearby/cts/
DDataElementTest.java45 private static final int KEY = 1; field in DataElementTest
51 DataElement dataElement = new DataElement(KEY, VALUE); in testBuilder()
53 assertThat(dataElement.getKey()).isEqualTo(KEY); in testBuilder()
60 DataElement dataElement = new DataElement(KEY, VALUE); in testWriteParcel()
69 assertThat(elementFromParcel.getKey()).isEqualTo(KEY); in testWriteParcel()
76 DataElement dataElement = new DataElement(KEY, VALUE); in describeContents()
91 DataElement dataElement = new DataElement(KEY, VALUE); in testEquals()
92 DataElement dataElement2 = new DataElement(KEY, VALUE); in testEquals()
120 DataElement dataElement = new DataElement(KEY, VALUE); in test_notEquals()
121 DataElement dataElement2 = new DataElement(KEY, new byte[]{1, 2, 1, 1}); in test_notEquals()
DCredentialElementTest.java38 private static final String KEY = "SECRETE_ID"; field in CredentialElementTest
44 CredentialElement element = new CredentialElement(KEY, VALUE); in testBuilder()
45 assertThat(element.getKey()).isEqualTo(KEY); in testBuilder()
52 CredentialElement element = new CredentialElement(KEY, VALUE); in testWriteParcel()
60 assertThat(elementFromParcel.getKey()).isEqualTo(KEY); in testWriteParcel()
67 CredentialElement element = new CredentialElement(KEY, VALUE); in describeContents()
74 CredentialElement element1 = new CredentialElement(KEY, VALUE); in testEqual()
75 CredentialElement element2 = new CredentialElement(KEY, VALUE); in testEqual()
DPresenceDeviceTest.java48 private static final int KEY = 3; field in PresenceDeviceTest
62 .addExtendedProperty(new DataElement(KEY, VALUE)) in testBuilder()
73 assertThat(dataElement.getKey()).isEqualTo(KEY); in testBuilder()
89 .addExtendedProperty(new DataElement(KEY, VALUE)) in testWriteParcel()
102 assertThat(parcelDevice.getExtendedProperties().get(0).getKey()).isEqualTo(KEY); in testWriteParcel()
113 .addExtendedProperty(new DataElement(KEY, VALUE)) in describeContents()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/signals/
DDBProtectedSignalTest.java42 DBProtectedSignalFixture.KEY, in testCreateSignal()
48 assertArrayEquals(DBProtectedSignalFixture.KEY, signal.getKey()); in testCreateSignal()
60 .setKey(DBProtectedSignalFixture.KEY) in testBuildSignal()
67 assertArrayEquals(DBProtectedSignalFixture.KEY, signal.getKey()); in testBuildSignal()
79 .setKey(DBProtectedSignalFixture.KEY) in testEqual()
88 .setKey(DBProtectedSignalFixture.KEY) in testEqual()
102 .setKey(DBProtectedSignalFixture.KEY) in testNotEqual()
111 .setKey(DBProtectedSignalFixture.KEY) in testNotEqual()
125 .setKey(DBProtectedSignalFixture.KEY) in testHashCode()
134 .setKey(DBProtectedSignalFixture.KEY) in testHashCode()
/packages/providers/ContactsProvider/tests/assets/testUnsynced/
Dlegacy_contacts.sql5 CREATE TABLE _sync_state (_id INTEGER PRIMARY KEY,_sync_account TEXT,data TEXT,UNIQUE(_sync_account…
10 CREATE TABLE calls (_id INTEGER PRIMARY KEY AUTOINCREMENT,number TEXT,date INTEGER,duration INTEGER…
11 CREATE TABLE contact_methods (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES peopl…
15 CREATE TABLE extensions (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL,value TEXT NOT NU…
16 CREATE TABLE fave_msg_status (_id INTEGER PRIMARY KEY, msg TEXT, next_retry INTEGER, num_retries IN…
17 CREATE TABLE fave_phone_changes (_id INTEGER PRIMARY KEY, old_phone TEXT, new_phone TEXT, change_ti…
18 CREATE TABLE faves (_id INTEGER PRIMARY KEY, ui_pos INTEGER, phone TEXT NOT NULL, nickname TEXT NOT…
24 CREATE TABLE groupmembership (_id INTEGER PRIMARY KEY,person INTEGER REFERENCES people(_id),group_i…
30 CREATE TABLE groups (_id INTEGER PRIMARY KEY AUTOINCREMENT,_sync_account TEXT,_sync_id TEXT,_sync_t…
32 CREATE TABLE organizations (_id INTEGER PRIMARY KEY AUTOINCREMENT,company TEXT,title TEXT,isprimary…
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/
DFetcherUtilTest.java72 private static final String KEY = "key"; field in FetcherUtilTest
176 JSONObject obj = new JSONObject().put(KEY, unsignedLongString); in extractUnsignedLong_maxValue_success()
179 FetcherUtil.extractUnsignedLong(obj, KEY)); in extractUnsignedLong_maxValue_success()
184 JSONObject obj = new JSONObject().put(KEY, "-123"); in extractUnsignedLong_negative_returnsEmpty()
185 assertEquals(Optional.empty(), FetcherUtil.extractUnsignedLong(obj, KEY)); in extractUnsignedLong_negative_returnsEmpty()
190 JSONObject obj = new JSONObject().put(KEY, 123); in extractUnsignedLong_notAString_returnsEmpty()
191 assertEquals(Optional.empty(), FetcherUtil.extractUnsignedLong(obj, KEY)); in extractUnsignedLong_notAString_returnsEmpty()
196 JSONObject obj = new JSONObject().put(KEY, "18446744073709551616"); in extractUnsignedLong_tooLarge_returnsEmpty()
197 assertEquals(Optional.empty(), FetcherUtil.extractUnsignedLong(obj, KEY)); in extractUnsignedLong_tooLarge_returnsEmpty()
202 JSONObject obj = new JSONObject().put(KEY, "123p"); in extractUnsignedLong_notAnInt_returnsEmpty()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DHomogenousBiMapTest.java28 private final static Integer KEY = 1; field in HomogenousBiMapTest
37 mBiMap.put(KEY, VALUE); in setUp()
42 assertThat(mBiMap.getForwardMap().get(KEY)).isEqualTo(VALUE); in put_works()
47 assertThat(mBiMap.getForwardMap().get(KEY)).isEqualTo(VALUE); in getForwardMap_works()
52 assertThat(mBiMap.getReverseMap().get(VALUE)).isEqualTo(KEY); in getReverseMap_works()
66 copy.put(KEY, VALUE); in equals_equalMaps_works()
82 copy.put(KEY, VALUE); in hashCode_equalMaps_works()
/packages/providers/ContactsProvider/tests/assets/testSynced/
Dlegacy_contacts.sql5 CREATE TABLE _sync_state (_id INTEGER PRIMARY KEY,_sync_account TEXT,data TEXT,UNIQUE(_sync_account…
11 CREATE TABLE calls (_id INTEGER PRIMARY KEY AUTOINCREMENT,number TEXT,date INTEGER,duration INTEGER…
12 CREATE TABLE contact_methods (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES peopl…
18 CREATE TABLE extensions (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL,value TEXT NOT NU…
19 CREATE TABLE fave_msg_status (_id INTEGER PRIMARY KEY, msg TEXT, next_retry INTEGER, num_retries IN…
21 CREATE TABLE fave_phone_changes (_id INTEGER PRIMARY KEY, old_phone TEXT, new_phone TEXT, change_ti…
22 CREATE TABLE faves (_id INTEGER PRIMARY KEY, ui_pos INTEGER, phone TEXT NOT NULL, nickname TEXT NOT…
28 CREATE TABLE groupmembership (_id INTEGER PRIMARY KEY,person INTEGER REFERENCES people(_id),group_i…
40 CREATE TABLE groups (_id INTEGER PRIMARY KEY AUTOINCREMENT,_sync_account TEXT,_sync_id TEXT,_sync_t…
42 CREATE TABLE organizations (_id INTEGER PRIMARY KEY AUTOINCREMENT,company TEXT,title TEXT,isprimary…
[all …]
/packages/providers/ContactsProvider/tests/assets/test1/
Dlegacy_contacts.sql6 CREATE TABLE _sync_state (_id INTEGER PRIMARY KEY,_sync_account TEXT,data TEXT,UNIQUE(_sync_account…
12 CREATE TABLE calls (_id INTEGER PRIMARY KEY AUTOINCREMENT,number TEXT,date INTEGER,duration INTEGER…
14 CREATE TABLE contact_methods (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES peopl…
31 CREATE TABLE extensions (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL,value TEXT NOT NU…
32 CREATE TABLE fave_msg_status (_id INTEGER PRIMARY KEY, msg TEXT, next_retry INTEGER, num_retries IN…
33 CREATE TABLE fave_phone_changes (_id INTEGER PRIMARY KEY, old_phone TEXT, new_phone TEXT, change_ti…
34 CREATE TABLE faves (_id INTEGER PRIMARY KEY, ui_pos INTEGER, phone TEXT NOT NULL, nickname TEXT NOT…
40 CREATE TABLE groupmembership (_id INTEGER PRIMARY KEY,person INTEGER REFERENCES people(_id),group_i…
47 CREATE TABLE groups (_id INTEGER PRIMARY KEY AUTOINCREMENT,_sync_account TEXT,_sync_id TEXT,_sync_t…
51 CREATE TABLE organizations (_id INTEGER PRIMARY KEY AUTOINCREMENT,company TEXT,title TEXT,isprimary…
[all …]
/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/shared/spe/framework/
DExecutionRuntimeParametersTest.java35 private static final String KEY = "testKey"; field in ExecutionRuntimeParametersTest
42 mExtras.putString(KEY, VAL); in setup()
53 expect.that(params.getExtras().getString(KEY)).isEqualTo(VAL); in testGettersAndSetters()
58 expect.that(mExtras.toString()).isEqualTo("PersistableBundle[{" + KEY + "=" + VAL + "}]"); in testToString()
65 assertWithMessage("ExecutionRuntimeParameters.getString(%s)", KEY) in testConvertJobParameters()
69 .getString(KEY)) in testConvertJobParameters()
/packages/providers/ContactsProvider/tests/assets/upgradeTest/
Dcontacts2_1108.sql3 CREATE TABLE _sync_state (_id INTEGER PRIMARY KEY,account_name TEXT NOT NULL,account_type TEXT NOT …
6 CREATE TABLE properties (property_key TEXT PRIMARY KEY, property_value TEXT );
14 CREATE TABLE accounts (_id INTEGER PRIMARY KEY AUTOINCREMENT,account_name TEXT, account_type TEXT, …
15 CREATE TABLE contacts (_id INTEGER PRIMARY KEY AUTOINCREMENT,name_raw_contact_id INTEGER REFERENCES…
16 CREATE TABLE deleted_contacts (contact_id INTEGER PRIMARY KEY,contact_deleted_timestamp INTEGER NOT…
17 CREATE TABLE raw_contacts (_id INTEGER PRIMARY KEY AUTOINCREMENT,account_id INTEGER REFERENCES acco…
18KEY AUTOINCREMENT, raw_contact_id INTEGER NOT NULL, res_package TEXT, icon TEXT, label TEXT, text …
19KEY AUTOINCREMENT, stream_item_id INTEGER NOT NULL, sort_index INTEGER, photo_file_id INTEGER NOT …
20 CREATE TABLE photo_files (_id INTEGER PRIMARY KEY AUTOINCREMENT, height INTEGER NOT NULL, width INT…
21 CREATE TABLE packages (_id INTEGER PRIMARY KEY AUTOINCREMENT,package TEXT NOT NULL);
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/
DSliceBuilderUtilsTest.java59 private static final String KEY = "KEY"; field in SliceBuilderUtilsTest
153 new FakePreferenceController(mContext, KEY)); in getDynamicSummary_allowDynamicSummary_returnsControllerSummary()
166 new FakePreferenceController(mContext, KEY)); in getDynamicSummary_allowDynamicSummary_nullSummary_returnsNull()
179 new FakePreferenceController(mContext, KEY)); in getDynamicSummary_noScreenTitle_returnsPrefControllerSummary()
192 new FakePreferenceController(mContext, KEY)); in getDynamicSummary_screenTitleMatchesTitle_returnsPrefControllerSummary()
204 final FakePreferenceController controller = new FakePreferenceController(mContext, KEY); in getDynamicSummary_emptyScreenTitle_emptyControllerSummary_returnsEmptyString()
215 new FakePreferenceController(mContext, KEY)); in getDynamicSummary_screenTitleAndControllerPlaceholder_returnsSliceEmptyString()
228 .appendPath(KEY) in getPathData_splitsIntentUri()
234 assertThat(pathPair.second).isEqualTo(KEY); in getPathData_splitsIntentUri()
242 .appendPath(KEY) in getPathData_splitsActionUri()
[all …]
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DDeviceConfigTest.java51 public static final String KEY = "car_api_test_prop"; field in DeviceConfigTest
58 DeviceConfig.deleteProperty(NAMESPACE_GAME_OVERLAY, KEY); in cleanUp()
69 assertThat(DeviceConfig.setProperty(NAMESPACE_GAME_OVERLAY, KEY, VALUE, in testUpdateConfigForCurrentUser()
71 assertThat(DeviceConfig.getProperty(NAMESPACE_GAME_OVERLAY, KEY)).isEqualTo(VALUE); in testUpdateConfigForCurrentUser()
80 () -> Settings.Config.putString(NAMESPACE_GAME_OVERLAY, KEY, VALUE, in testUpdateConfigForBackgroundUser()
/packages/apps/Settings/src/com/android/settings/notification/zen/
DZenModeAddAutomaticRulePreferenceController.java33 protected static final String KEY = "zen_mode_add_automatic_rule"; field in ZenModeAddAutomaticRulePreferenceController
38 super(context, KEY, parent, lifecycle); in ZenModeAddAutomaticRulePreferenceController()
44 return KEY; in getPreferenceKey()
55 Preference pref = screen.findPreference(KEY); in displayPreference()
DZenAutomaticRuleSwitchPreferenceController.java36 private static final String KEY = "zen_automatic_rule_switch"; field in ZenAutomaticRuleSwitchPreferenceController
43 super(context, KEY, parent, lifecycle); in ZenAutomaticRuleSwitchPreferenceController()
48 return KEY; in getPreferenceKey()
64 final Preference pref = screen.findPreference(KEY); in displayPreference()
DZenModeRepeatCallersPreferenceController.java35 protected static final String KEY = "zen_mode_repeat_callers"; field in ZenModeRepeatCallersPreferenceController
42 super(context, KEY, lifecycle); in ZenModeRepeatCallersPreferenceController()
50 return KEY; in getPreferenceKey()
61 setRepeatCallerSummary(screen.findPreference(KEY)); in displayPreference()
DZenModeBlockedEffectsPreferenceController.java27 protected static final String KEY = "zen_mode_block_effects_settings"; field in ZenModeBlockedEffectsPreferenceController
31 super(context, KEY, lifecycle); in ZenModeBlockedEffectsPreferenceController()
37 return KEY; in getPreferenceKey()
/packages/modules/OnDevicePersonalization/src/com/android/ondevicepersonalization/services/data/vendor/
DVendorDataContract.java38 public static final String KEY = "key"; field in VendorDataContract.VendorDataEntry
54 + KEY + " TEXT NOT NULL," in getCreateTableIfNotExistsStatement()
57 + "PRIMARY KEY(" + KEY + "))"; in getCreateTableIfNotExistsStatement()
DLocalDataContract.java38 public static final String KEY = "key"; field in LocalDataContract.LocalDataEntry
54 + KEY + " TEXT NOT NULL," in getCreateTableIfNotExistsStatement()
57 + "PRIMARY KEY(" + KEY + "))"; in getCreateTableIfNotExistsStatement()

12345678910>>...12