/cts/tests/autofillservice/src/android/autofillservice/cts/common/ |
H A D | SettingsHelper.java | 40 public static void set(@NonNull String namespace, @NonNull String key, @Nullable String value) { argument 42 delete(namespace, key); 45 runShellCommand("settings put %s %s %s default", namespace, key, value); 48 public static void set(@NonNull String key, @Nullable String value) { argument 49 set(NAMESPACE_SECURE, key, value); 56 @NonNull String key, @Nullable String value) { 58 syncDelete(context, namespace, key); 62 final String currentValue = get(namespace, key); 69 new OneTimeSettingsListener(context, namespace, key); 70 set(namespace, key, valu 55 syncSet(@onNull Context context, @NonNull String namespace, @NonNull String key, @Nullable String value) argument 77 syncSet(@onNull Context context, @NonNull String key, @Nullable String value) argument 85 delete(@onNull String namespace, @NonNull String key) argument 89 delete(@onNull String key) argument 96 syncDelete(@onNull Context context, @NonNull String namespace, @NonNull String key) argument 114 syncDelete(@onNull Context context, @NonNull String key) argument 122 get(@onNull String namespace, @NonNull String key) argument 127 get(@onNull String key) argument [all...] |
H A D | SettingsStateChangerRule.java | 35 * @param key prefence key. 38 public SettingsStateChangerRule(@NonNull Context context, @NonNull String key, argument 40 this(context, SettingsHelper.NAMESPACE_SECURE, key, value); 48 * @param key prefence key. 52 @NonNull String key, @Nullable String value) { 53 super(new SettingsStateManager(context, namespace, key), value); 51 SettingsStateChangerRule(@onNull Context context, @NonNull String namespace, @NonNull String key, @Nullable String value) argument
|
H A D | SettingsStateKeeperRule.java | 33 * @param key prefence key. 35 public SettingsStateKeeperRule(@NonNull Context context, @NonNull String key) { argument 36 super(new SettingsStateManager(context, SettingsHelper.NAMESPACE_SECURE, key));
|
H A D | OneTimeSettingsListener.java | 41 public OneTimeSettingsListener(Context context, String key) { argument 42 this(context, NAMESPACE_SECURE, key); 45 public OneTimeSettingsListener(Context context, String namespace, String key) { argument 47 mKey = key; 52 uri = Settings.Secure.getUriFor(key); 55 uri = Settings.Global.getUriFor(key);
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
H A D | SettingsUtils.java | 25 public static void putGlobalSetting(String key, String value) { argument 27 SystemUtil.runShellCommandForNoOutput("settings put global " + key + " " + value); 33 public static void putSecureSetting(String key, String value) { argument 35 "settings --user current put secure " + key + " " + value);
|
H A D | BundleUtils.java | 35 final String key = keysAndValues[i].toString(); 39 ret.putString(key, null); 42 ret.putBoolean(key, (Boolean) value); 45 ret.putInt(key, (Integer) value); 48 ret.putString(key, (String) value); 51 ret.putBundle(key, (Bundle) value);
|
/cts/common/device-side/device-info/src_stub/android/os/ |
H A D | SystemProperties.java | 8 public static String get(String key, String def) { return null; } argument
|
/cts/tools/utils/ |
H A D | certificates.py | 23 key = None variable in class:Certificate 24 def __init__(self, cert, key): 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", 55 if key is None: 56 key [all...] |
/cts/tests/tests/location/src/android/location/cts/psedorange/ |
H A D | TroposphericModelEgnos.java | 215 int key = (int) (absLatitudeDeg / LATITUDE_15_DEGREES); 217 double averagePressureMbar = interpolate(key * LATITUDE_15_DEGREES, 218 latDegreeToPressureMbarAvgMap[key - 1], (key + 1) * LATITUDE_15_DEGREES, 219 latDegreeToPressureMbarAvgMap[key], absLatitudeDeg); 220 double amplitudePressureMbar = interpolate(key * LATITUDE_15_DEGREES, 221 latDegreeToPressureMbarAmpMap[key - 1], (key + 1) * LATITUDE_15_DEGREES, 222 latDegreeToPressureMbarAmpMap[key], absLatitudeDeg); 225 double averageTempKelvin = interpolate(key * LATITUDE_15_DEGREE [all...] |
/cts/apps/CameraITS/tests/scene0/ |
H A D | test_sensor_events.py | 37 for key, existing in sensors.iteritems(): 39 e_msg = 'Sensor %s has no events!' % key 40 assert len(events[key]) > 0, e_msg
|
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/ |
H A D | StaticMetadata.java | 338 // Optional key. Default value is 1 if key is missing. 420 Key<Float> key = CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE; 429 minFocusDistance = getValueFromKeyNonNull(key); 431 minFocusDistance = mCharacteristics.get(key); 438 checkTrueForKey(key, " minFocusDistance value shouldn't be negative", 453 Key<Integer> key = CameraCharacteristics.LENS_INFO_FOCUS_DISTANCE_CALIBRATION; 454 Integer calibration = getValueFromKeyNonNull(key); 460 checkTrueForKey(key, " value is out of range" , 521 Key<int[]> key 2373 getArrayElementOrDefault(Key<?> key, T defaultValue, String name, int index, int size) argument 2402 getArrayElementNonNull(Key<?> key, int element) argument 2418 getArrayElementCheckRangeNonNull(Key<?> key, int element, int size) argument 2450 getValueFromKeyNonNull(Key<T> key) argument 2464 checkArrayValuesInRange(Key<int[]> key, int[] array, int min, int max) argument 2471 checkArrayValuesInRange(Key<byte[]> key, byte[] array, byte min, byte max) argument 2484 checkElementDistinct(Key<U> key, List<T> list) argument 2490 checkTrueForKey(Key<T> key, String message, boolean condition) argument 2509 failKeyCheck(Key<T> key, String message) argument [all...] |
H A D | CameraErrorCollector.java | 619 * Check if the key value is not null and return the value. 621 * @param characteristics The {@link CameraCharacteristics} to get the key from. 622 * @param key The {@link CameraCharacteristics} key to be checked. 624 * @return The value of the key. 627 CameraCharacteristics.Key<T> key) { 629 T value = characteristics.get(key); 631 addMessage("Key " + key.getName() + " shouldn't be null"); 638 * Check if the key value is not null and return the value. 640 * @param request The {@link CaptureRequest} to get the key fro 626 expectKeyValueNotNull(CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key) argument 645 expectKeyValueNotNull(CaptureRequest request, CaptureRequest.Key<T> key) argument 663 expectKeyValueNotNull(Builder request, CaptureRequest.Key<T> key) argument 680 expectKeyValueNotNull(CaptureResult result, CaptureResult.Key<T> key) argument 692 expectKeyValueNotNull(String msg, CaptureResult result, CaptureResult.Key<T> key) argument 709 expectKeyValueNotEquals( Builder request, CaptureRequest.Key<T> key, T expected) argument 731 expectKeyValueNotEquals( CaptureResult result, CaptureResult.Key<T> key, T expected) argument 753 expectKeyValueEquals(CaptureResult result, CaptureResult.Key<T> key, T expected) argument 778 expectKeyValueEquals(Builder request, CaptureRequest.Key<T> key, T expected) argument 800 expectKeyValueGreaterOrEqual( CaptureResult result, CaptureResult.Key<T> key, T expected) argument 817 expectKeyValueGreaterThan( CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key, T expected) argument 835 expectKeyValueInRange( CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key, T min, T max) argument 852 expectKeyValueInRange( Builder request, CaptureRequest.Key<T> key, T min, T max) argument 868 expectKeyValueIsIn(CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key, T... expected) argument 886 expectKeyValueIsIn(Builder request, CaptureRequest.Key<T> key, T... expected) argument 903 expectKeyValueIsIn(CaptureResult result, CaptureResult.Key<T> key, T... expected) argument 921 expectKeyValueContains(CameraCharacteristics characteristics, CameraCharacteristics.Key<T[]> key, T expected) argument 939 expectKeyValueContains(CameraCharacteristics characteristics, CameraCharacteristics.Key<int[]> key, int expected) argument 957 expectKeyValueContains(CameraCharacteristics characteristics, CameraCharacteristics.Key<boolean[]> key, boolean expected) argument [all...] |
/cts/tests/sample/src/android/sample/ |
H A D | SampleDeviceActivity.java | 42 * Saves the given key value pair to the shared preferences. 44 * @param key 47 public void savePreference(String key, String value) { argument 50 // Insert the key value pair. 51 editor.putString(key, value); 57 * Looks up the given key in the shared preferences. 59 * @param key 62 public String getPreference(String key) { argument 63 return mPreferences.getString(key, null);
|
/cts/tests/sensor/src/android/hardware/cts/helpers/ |
H A D | SensorStats.java | 77 * @param key the key. 80 public synchronized void addValue(String key, Object value) { argument 84 mValues.put(key, value); 91 * @param key the key 94 public synchronized void addSensorStats(String key, SensorStats stats) { argument 98 mSensorStats.put(key, stats); 113 public synchronized Object getValue(String key) { argument 114 return mValues.get(key); [all...] |
/cts/tests/tests/drm/src/android/drm/cts/ |
H A D | DrmInfoRequestTest.java | 75 final String key = (String) keys.next(); 76 request.put(key, attributes.get(key)); 82 final String key = (String) keys.next(); 83 assertEquals(request.get(key), attributes.get(key)); 88 final String key = (String) infoKeys.next(); 89 assertEquals(request.get(key), attributes.get(key));
|
H A D | DrmInfoTest.java | 86 final String key = (String) keys.next(); 87 info.put(key, attributes.get(key)); 93 final String key = (String) keys.next(); 94 assertEquals(info.get(key), attributes.get(key)); 99 final String key = (String) infoKeys.next(); 100 assertEquals(info.get(key), attributes.get(key));
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
H A D | FbeHelper.java | 91 for (char key : numericKeys.toCharArray()) { 92 if (key >= '0' && key <= '9') { 93 mUiDevice.pressKeyCode(KeyEvent.KEYCODE_0 + key - '0'); 95 throw new IllegalArgumentException(key + " is not a numeric key.");
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
H A D | RSACipherTest.java | 43 for (ImportedKey key : RSASignatureTest.importKatKeyPairs(getContext(), 49 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); 50 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); 66 throw new RuntimeException("Failed for key " + key.getAlias(), e); 76 for (ImportedKey key : RSASignatureTest.importKatKeyPairs(getContext(), 82 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); 83 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); 95 throw new RuntimeException("Failed for key " + key [all...] |
H A D | MacTest.java | 214 SecretKey key = importDefaultKatKey(algorithm); 218 mac.init(key); 231 SecretKey key = importDefaultKatKey(algorithm); 235 mac.init(key); 252 SecretKey key = importDefaultKatKey(algorithm); 256 mac.init(key); 260 assertMacVerifiesOneShot(algorithm, provider, key, message, macBytes); 273 SecretKey key = getDefaultKatKey(algorithm); 282 assertMacVerifiesOneShot(algorithm, key, message, macBytes); 296 SecretKey key 458 assertMacVerifiesOneShot( String algorithm, SecretKey key, byte[] message, byte[] mac) argument 466 assertMacVerifiesOneShot( String algorithm, Provider provider, SecretKey key, byte[] message, byte[] mac) argument 484 assertMacDoesNotVerifyOneShot( String algorithm, SecretKey key, byte[] message, byte[] mac) argument 499 assertMacVerifiesFedOneByteAtATime( String algorithm, SecretKey key, byte[] message, byte[] mac) argument 518 assertMacVerifiesFedUsingFixedSizeChunks( String algorithm, SecretKey key, byte[] message, byte[] mac, int chunkSizeBytes) argument 597 public byte[] key; field in class:MacTest.KatVector 600 KatVector(byte[] key, byte[] mac) argument [all...] |
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/ |
H A D | SensorOperation.java | 78 protected void addSensorStats(String key, SensorStats stats) { argument 79 getStats().addSensorStats(key, stats); 85 * operations. The key added is in the form {@code key + "_" + index} where index may be zero 88 protected void addSensorStats(String key, int index, SensorStats stats) { argument 89 addSensorStats(String.format("%s_%03d", key, index), stats);
|
/cts/tests/leanbackjank/src/android/leanbackjank/cts/ |
H A D | CtsJankTestBase.java | 36 private void printIntValueWithKey(String source, Bundle metrics, String key, argument 38 if (!metrics.containsKey(key)) { 41 mLog.addValue(source, formatKeyForTestMetrics(key), metrics.getInt(key), resultType, resultUnit); 44 private void printDoubleValueWithKey(String source, Bundle metrics, String key, argument 46 if (!metrics.containsKey(key)) { 49 mLog.addValue(source, formatKeyForTestMetrics(key), metrics.getDouble(key), resultType, 53 private String formatKeyForTestMetrics(String key) { argument 54 return key [all...] |
/cts/tests/signature/src/android/signature/cts/ |
H A D | CurrentApi.java | 138 * @param key modifier name 142 private static int modifierDescriptionToReflectedType(String name, String key, String value) { argument 143 if (key.equals(MODIFIER_ABSTRACT)) { 145 } else if (key.equals(MODIFIER_FINAL)) { 147 } else if (key.equals(MODIFIER_NATIVE)) { 149 } else if (key.equals(MODIFIER_STATIC)) { 151 } else if (key.equals(MODIFIER_SYNCHRONIZED)) { 153 } else if (key.equals(MODIFIER_TRANSIENT)) { 155 } else if (key.equals(MODIFIER_VOLATILE)) { 157 } else if (key [all...] |
/cts/tests/tests/content/src/android/content/cts/ |
H A D | SharedPreferencesTest.java | 85 String key = "not-set"; 86 assertFalse(prefs.contains(key)); 89 assertEquals(false, prefs.getBoolean(key, false)); 90 assertEquals(true, prefs.getBoolean(key, true)); 91 assertEquals(0.5f, prefs.getFloat(key, 0.5f)); 92 assertEquals(123, prefs.getInt(key, 123)); 93 assertEquals(999L, prefs.getLong(key, 999L)); 94 assertEquals("default", prefs.getString(key, "default")); 99 prefs.edit().putString("test-key", "test-value").commit(); 100 assertEquals("test-value", prefs.getString("test-key", nul [all...] |
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
H A D | KeyboardTest.java | 42 for (final Key key : keyboard.getKeys()) { 43 if (!key.sticky) { 44 nonStickyKey = key; 48 for (final Key key : keyboard.getModifierKeys()) { 49 if (key.sticky) { 50 stickyKey = key; 66 // Pressing the key must flip the "pressed" state only. 74 // Releasing the key inside the key area must flip the "pressed" state and toggle the "on" 75 // state if the key i [all...] |
/cts/tests/tests/assist/src/android/assist/cts/ |
H A D | ExtraAssistDataTest.java | 89 for (String key : extraExpectedBundle.keySet()) { 90 assertTrue("Assist bundle does not contain expected extra context key: " + key, 91 extraAssistBundle.containsKey(key)); 92 assertEquals("Extra assist context bundle values do not match for key: " + key, 93 extraExpectedBundle.get(key), extraAssistBundle.get(key));
|