Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 116) sorted by relevance

12345

/cts/tests/camera/src/android/hardware/camera2/cts/helpers/
DStaticMetadata.java390 Key<Float> key = CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE; in getMinimumFocusDistanceChecked() local
399 minFocusDistance = getValueFromKeyNonNull(key); in getMinimumFocusDistanceChecked()
401 minFocusDistance = mCharacteristics.get(key); in getMinimumFocusDistanceChecked()
408 checkTrueForKey(key, " minFocusDistance value shouldn't be negative", in getMinimumFocusDistanceChecked()
423 Key<Integer> key = CameraCharacteristics.LENS_INFO_FOCUS_DISTANCE_CALIBRATION; in getFocusDistanceCalibrationChecked() local
424 Integer calibration = getValueFromKeyNonNull(key); in getFocusDistanceCalibrationChecked()
430 checkTrueForKey(key, " value is out of range" , in getFocusDistanceCalibrationChecked()
481 Key<int[]> key = CameraCharacteristics.CONTROL_AE_AVAILABLE_ANTIBANDING_MODES; in getAeAvailableAntiBandingModesChecked() local
482 int[] modes = getValueFromKeyNonNull(key); in getAeAvailableAntiBandingModesChecked()
488 checkTrueForKey(key, "mode value " + mode + " is out if range", in getAeAvailableAntiBandingModesChecked()
[all …]
DCameraErrorCollector.java629 CameraCharacteristics.Key<T> key) { in expectKeyValueNotNull() argument
631 T value = characteristics.get(key); in expectKeyValueNotNull()
633 addMessage("Key " + key.getName() + " shouldn't be null"); in expectKeyValueNotNull()
648 CaptureRequest.Key<T> key) { in expectKeyValueNotNull() argument
650 T value = request.get(key); in expectKeyValueNotNull()
652 addMessage("Key " + key.getName() + " shouldn't be null"); in expectKeyValueNotNull()
665 public <T> T expectKeyValueNotNull(Builder request, CaptureRequest.Key<T> key) { in expectKeyValueNotNull() argument
667 T value = request.get(key); in expectKeyValueNotNull()
669 addMessage("Key " + key.getName() + " shouldn't be null"); in expectKeyValueNotNull()
682 public <T> T expectKeyValueNotNull(CaptureResult result, CaptureResult.Key<T> key) { in expectKeyValueNotNull() argument
[all …]
/cts/tools/utils/
Dcertificates.py23 key = None variable in Certificate
24 def __init__(self, cert, key): argument
26 self.key = key
32 return crypto.dump_privatekey(crypto.FILETYPE_PEM, self.key)
48 key = crypto.load_privatekey(crypto.FILETYPE_PEM, data)
49 return Certificate(cert, key)
52 def create(cn, issuer=None, key=None, keysize=2048, digest="sha256", argument
55 if key is None:
56 key = crypto.PKey()
57 key.generate_key(crypto.TYPE_RSA, keysize)
[all …]
/cts/tests/tests/keystore/src/android/keystore/cts/
DRSACipherTest.java43 for (ImportedKey key : RSASignatureTest.importKatKeyPairs(getContext(), in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
49 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
50 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
66 throw new RuntimeException("Failed for key " + key.getAlias(), e); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
76 for (ImportedKey key : RSASignatureTest.importKatKeyPairs(getContext(), in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
82 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
83 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
95 throw new RuntimeException("Failed for key " + key.getAlias(), e); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
104 for (ImportedKey key : RSASignatureTest.importKatKeyPairs(getContext(), in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
110 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
[all …]
DMacTest.java214 SecretKey key = importDefaultKatKey(algorithm); in testAndroidKeyStoreKeysHandledByAndroidKeyStoreProvider() local
218 mac.init(key); in testAndroidKeyStoreKeysHandledByAndroidKeyStoreProvider()
231 SecretKey key = importDefaultKatKey(algorithm); in testMacGeneratedForEmptyMessage() local
235 mac.init(key); in testMacGeneratedForEmptyMessage()
252 SecretKey key = importDefaultKatKey(algorithm); in testMacGeneratedByAndroidKeyStoreVerifiesByAndroidKeyStore() local
256 mac.init(key); in testMacGeneratedByAndroidKeyStoreVerifiesByAndroidKeyStore()
260 assertMacVerifiesOneShot(algorithm, provider, key, message, macBytes); in testMacGeneratedByAndroidKeyStoreVerifiesByAndroidKeyStore()
273 SecretKey key = getDefaultKatKey(algorithm); in testMacGeneratedByAndroidKeyStoreVerifiesByHighestPriorityProvider() local
282 assertMacVerifiesOneShot(algorithm, key, message, macBytes); in testMacGeneratedByAndroidKeyStoreVerifiesByHighestPriorityProvider()
296 SecretKey key = getDefaultKatKey(algorithm); in testMacGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore() local
[all …]
DTestUtils.java117 static int getKeySizeBits(Key key) { in getKeySizeBits() argument
118 if (key instanceof ECKey) { in getKeySizeBits()
119 return ((ECKey) key).getParams().getCurve().getField().getFieldSize(); in getKeySizeBits()
120 } else if (key instanceof RSAKey) { in getKeySizeBits()
121 return ((RSAKey) key).getModulus().bitLength(); in getKeySizeBits()
123 throw new IllegalArgumentException("Unsupported key type: " + key.getClass()); in getKeySizeBits()
177 private static void assertKeyMaterialExportable(Key key) { in assertKeyMaterialExportable() argument
178 if (key instanceof PublicKey) { in assertKeyMaterialExportable()
179 assertEquals("X.509", key.getFormat()); in assertKeyMaterialExportable()
180 } else if (key instanceof PrivateKey) { in assertKeyMaterialExportable()
[all …]
/cts/common/util/src/com/android/compatibility/common/util/
DKeyValueArgsParser.java32 String key = null; in parse() local
34 if (key == null) { in parse()
38 key = s; in parse()
40 map.put(key, s); in parse()
41 key = null; in parse()
44 if (key != null) { in parse()
DDynamicConfig.java57 public String getValue(String key) { in getValue() argument
58 List<String> singleValue = mDynamicConfigMap.get(key); in getValue()
66 public List<String> getValues(String key) { in getValues() argument
67 return mDynamicConfigMap.get(key); in getValues()
90 String key = parser.getAttributeValue(NS, KEY_ATTR); in createConfigMap() local
98 if (key != null && !key.isEmpty()) { in createConfigMap()
99 dynamicConfigMap.put(key, valueList); in createConfigMap()
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/
DSensorStats.java77 public synchronized void addValue(String key, Object value) { in addValue() argument
81 mValues.put(key, value); in addValue()
91 public synchronized void addSensorStats(String key, SensorStats stats) { in addSensorStats() argument
95 mSensorStats.put(key, stats); in addSensorStats()
110 public synchronized Object getValue(String key) { in getValue() argument
111 return mValues.get(key); in getValue()
126 String key = statsEntry.getKey() + DELIMITER + valueEntry.getKey(); in flatten() local
127 flattenedMap.put(key, valueEntry.getValue()); in flatten()
138 for (String key : getSortedKeys(flattened)) { in log()
139 Object value = flattened.get(key); in log()
[all …]
/cts/libs/deviceutil/src/android/cts/util/
DKeyEventUtil.java106 String key = keys[i]; in sendKeys() local
107 int repeater = key.indexOf('*'); in sendKeys()
111 keyCount = repeater == -1 ? 1 : Integer.parseInt(key.substring(0, repeater)); in sendKeys()
113 Log.w("ActivityTestCase", "Invalid repeat count: " + key); in sendKeys()
118 key = key.substring(repeater + 1); in sendKeys()
123 final Field keyCodeField = KeyEvent.class.getField("KEYCODE_" + key); in sendKeys()
133 Log.w("ActivityTestCase", "Unknown keycode: KEYCODE_" + key); in sendKeys()
136 Log.w("ActivityTestCase", "Unknown keycode: KEYCODE_" + key); in sendKeys()
149 public final void sendKeyDownUp(final View targetView, final int key) { in sendKeyDownUp() argument
150 sendKey(targetView, new KeyEvent(KeyEvent.ACTION_DOWN, key)); in sendKeyDownUp()
[all …]
/cts/tests/tests/preference2/src/android/preference2/cts/
DPreferenceTest.java111 String key = mPreference.getKey(); in testGetKey() local
113 assertEquals(keyExp, key); in testGetKey()
117 final String key = "key1"; in testSetKey() local
120 mPreference.setKey(key); in testSetKey()
123 assertEquals(key, mPreference.getKey()); in testSetKey()
184 String key = "" + Math.random(); in testPersistInt() local
185 mCustomPreference.setKey(key); in testPersistInt()
201 String key = "" + Math.random(); in testPersistBoolean() local
202 mCustomPreference.setKey(key); in testPersistBoolean()
219 String key = "" + Math.random(); in testPersistString() local
[all …]
/cts/tests/tests/drm/src/android/drm/cts/
DDrmInfoRequestTest.java73 final String key = (String) keys.next(); in testPutAndGetKeys() local
74 request.put(key, attributes.get(key)); in testPutAndGetKeys()
80 final String key = (String) keys.next(); in testPutAndGetKeys() local
81 assertEquals(request.get(key), attributes.get(key)); in testPutAndGetKeys()
86 final String key = (String) infoKeys.next(); in testPutAndGetKeys() local
87 assertEquals(request.get(key), attributes.get(key)); in testPutAndGetKeys()
DDrmInfoTest.java83 final String key = (String) keys.next(); in testPutAndGetKeys() local
84 info.put(key, attributes.get(key)); in testPutAndGetKeys()
90 final String key = (String) keys.next(); in testPutAndGetKeys() local
91 assertEquals(info.get(key), attributes.get(key)); in testPutAndGetKeys()
96 final String key = (String) infoKeys.next(); in testPutAndGetKeys() local
97 assertEquals(info.get(key), attributes.get(key)); in testPutAndGetKeys()
/cts/tests/tests/content/src/android/content/cts/
DSharedPreferencesTest.java81 String key = "not-set"; in testDefaults() local
82 assertFalse(prefs.contains(key)); in testDefaults()
85 assertEquals(false, prefs.getBoolean(key, false)); in testDefaults()
86 assertEquals(true, prefs.getBoolean(key, true)); in testDefaults()
87 assertEquals(0.5f, prefs.getFloat(key, 0.5f)); in testDefaults()
88 assertEquals(123, prefs.getInt(key, 123)); in testDefaults()
89 assertEquals(999L, prefs.getLong(key, 999L)); in testDefaults()
90 assertEquals("default", prefs.getString(key, "default")); in testDefaults()
249 String key = new Integer(rand.nextInt(25)).toString(); in testTorture() local
254 Log.d(TAG, "Setting " + key + "=" + value); in testTorture()
[all …]
/cts/tests/tests/util/src/android/util/cts/
DArrayMapTest.java165 Object key = array.keyAt(i); in compareMaps() local
166 Object expValue = map.get(key); in compareMaps()
169 + " at key " + key); in compareMaps()
274 String key = iterator1.next(); in compareBundles() local
275 int value1 = bundle1.getInt(key); in compareBundles()
276 if (bundle2.get(key) == null) { in compareBundles()
277 fail("Bad Bundle: bundle2 didn't have expected key " + key); in compareBundles()
279 int value2 = bundle2.getInt(key); in compareBundles()
281 fail("Bad Bundle: at key key " + key + " expected " + value1 + ", got " + value2); in compareBundles()
287 String key = iterator2.next(); in compareBundles() local
[all …]
/cts/tests/tests/view/src/android/view/inputmethod/cts/
DKeyboardTest.java36 for (final Key key : keyboard.getKeys()) { in testKeyOnPressedAndReleased()
37 if (!key.sticky) { in testKeyOnPressedAndReleased()
38 nonStickyKey = key; in testKeyOnPressedAndReleased()
42 for (final Key key : keyboard.getModifierKeys()) { in testKeyOnPressedAndReleased()
43 if (key.sticky) { in testKeyOnPressedAndReleased()
44 stickyKey = key; in testKeyOnPressedAndReleased()
/cts/tests/leanbackjank/src/android/leanbackjank/cts/
DCtsJankTestBase.java36 private void printIntValueWithKey(String source, Bundle metrics, String key, in printIntValueWithKey() argument
38 if (!metrics.containsKey(key)) { in printIntValueWithKey()
41 mLog.addValue(source, key, metrics.getInt(key), resultType, resultUnit); in printIntValueWithKey()
44 private void printDoubleValueWithKey(String source, Bundle metrics, String key, in printDoubleValueWithKey() argument
46 if (!metrics.containsKey(key)) { in printDoubleValueWithKey()
49 mLog.addValue(source, key, metrics.getDouble(key), resultType, resultUnit); in printDoubleValueWithKey()
/cts/tests/sample/src/android/sample/
DSampleDeviceActivity.java47 public void savePreference(String key, String value) { in savePreference() argument
51 editor.putString(key, value); in savePreference()
62 public String getPreference(String key) { in getPreference() argument
63 return mPreferences.getString(key, null); in getPreference()
/cts/suite/cts/utils/
Dget_csv_report.py119 def addKV(self, key, value): argument
120 self.infoKeys.append(key)
135 def getInfoV(self, key): argument
136 if key in self.infoKeys:
137 return self.infoValues[self.infoKeys.index(key)]
166 for key in deviceResult.getResults().keys():
167 if not key in tests:
168 tests.append(key)
199 for key in reportInfo:
200 f.write(key)
[all …]
/cts/tests/tests/assist/src/android/assist/cts/
DExtraAssistDataTest.java89 for (String key : extraExpectedBundle.keySet()) { in testAssistContentAndAssistData()
90 assertTrue("Assist bundle does not contain expected extra context key: " + key, in testAssistContentAndAssistData()
91 extraAssistBundle.containsKey(key)); in testAssistContentAndAssistData()
92 assertEquals("Extra assist context bundle values do not match for key: " + key, in testAssistContentAndAssistData()
93 extraExpectedBundle.get(key), extraAssistBundle.get(key)); in testAssistContentAndAssistData()
/cts/tests/tests/database/src/android/database/cts/
DDatabaseUtilsTest.java165 String key = "key"; in testCursorDoubleToContentValues() local
167 DatabaseUtils.cursorDoubleToContentValues(cursor, "age", contentValues, key); in testCursorDoubleToContentValues()
168 assertEquals(20.0, contentValues.getAsDouble(key)); in testCursorDoubleToContentValues()
170 DatabaseUtils.cursorDoubleToContentValues(cursor, "Error Field Name", contentValues, key); in testCursorDoubleToContentValues()
171 assertNull(contentValues.getAsDouble(key)); in testCursorDoubleToContentValues()
173 DatabaseUtils.cursorDoubleToContentValues(cursor, "name", contentValues, key); in testCursorDoubleToContentValues()
174 assertEquals(0.0, contentValues.getAsDouble(key)); in testCursorDoubleToContentValues()
203 String key = "key"; in testCursorIntToContentValues() local
205 DatabaseUtils.cursorIntToContentValues(cursor, "age", contentValues, key); in testCursorIntToContentValues()
206 assertEquals(Integer.valueOf(20), contentValues.getAsInteger(key)); in testCursorIntToContentValues()
[all …]
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/
DSensorOperation.java78 protected void addSensorStats(String key, SensorStats stats) { in addSensorStats() argument
79 getStats().addSensorStats(key, stats); in addSensorStats()
88 protected void addSensorStats(String key, int index, SensorStats stats) { in addSensorStats() argument
89 addSensorStats(String.format("%s_%03d", key, index), stats); in addSensorStats()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBleScannerHardwareScanFilterActivity.java148 public void addItem(String key) { in addItem() argument
149 if (!mData.containsKey(key)) { in addItem()
150 mKeys.add(key); in addItem()
151 mData.put(key, new Integer(1)); in addItem()
153 mData.put(key, mData.get(key) + 1); in addItem()
164 String key = mKeys.get(pos); in getView() local
168 text1.setText(key); in getView()
/cts/tests/app/app/src/android/app/stubs/
DFragmentTestActivity.java99 String key = TRANSITION_KEY + i; in onCreate() local
100 mTransitionIds[i] = savedInstanceState.getInt(key, mTransitionIds[i]); in onCreate()
110 String key = TRANSITION_KEY + i; in onSaveInstanceState() local
111 outState.putInt(key, mTransitionIds[i]); in onSaveInstanceState()
144 private Transition loadTransition(int key) { in loadTransition() argument
145 final int id = mTransitionIds[key]; in loadTransition()
150 transition.addListener(mListeners[key]); in loadTransition()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/assets/
Dgenerate-client-cert-chain.sh29 -keyout private/ca.key.pem \
44 -keyout intermediate/private/intermediate.key.pem \
61 -keyout user.key.pem \
90 -in "$WORKDIR"/user.key.pem \
91 -out user-cert-chain.key

12345