/cts/tests/tests/content/src/android/content/cts/ |
D | SharedPreferencesTest.java | 55 SharedPreferences prefs = getPrefs(); in setUp() local 56 prefs.edit().clear().commit(); in setUp() 77 SharedPreferences prefs = getPrefs(); in testCommitCreatesFiles() local 79 prefs.edit().putString("foo", "bar").commit(); in testCommitCreatesFiles() 84 SharedPreferences prefs = getPrefs(); in testDefaults() local 86 assertFalse(prefs.contains(key)); in testDefaults() 87 assertEquals(0, prefs.getAll().size()); in testDefaults() 88 assertTrue(prefs.getAll().isEmpty()); in testDefaults() 89 assertEquals(false, prefs.getBoolean(key, false)); in testDefaults() 90 assertEquals(true, prefs.getBoolean(key, true)); in testDefaults() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/car/ |
D | GarageModeTestActivity.java | 84 SharedPreferences prefs = context.getSharedPreferences( in onCreate() local 87 SharedPreferences.Editor editor = prefs.edit(); in onCreate() 122 SharedPreferences prefs = context.getSharedPreferences( in verifyStatus() local 128 long initiateTime = prefs.getLong(GarageModeChecker.PREFS_INITIATION, 0); in verifyStatus() 129 long garageModeStart = prefs.getLong(GarageModeChecker.PREFS_GARAGE_MODE_START, 0); in verifyStatus() 130 long garageModeEnd = prefs.getLong(GarageModeChecker.PREFS_GARAGE_MODE_END, 0); in verifyStatus() 131 long termination = prefs.getLong(GarageModeChecker.PREFS_TERMINATION, 0); in verifyStatus() 132 long jobUpdate = prefs.getLong(GarageModeChecker.PREFS_JOB_UPDATE, 0); in verifyStatus() 133 boolean hadConnectivity = prefs.getBoolean(GarageModeChecker.PREFS_HAD_CONNECTIVITY, false); in verifyStatus()
|
D | GarageModeChecker.java | 120 SharedPreferences prefs = mIdleJobContext.getSharedPreferences(PREFS_FILE_NAME, 122 SharedPreferences.Editor editor = prefs.edit(); 140 SharedPreferences prefs = mIdleJobContext.getSharedPreferences(PREFS_FILE_NAME, 142 SharedPreferences.Editor editor = prefs.edit(); 163 SharedPreferences prefs = mIdleJobContext.getSharedPreferences(PREFS_FILE_NAME, in onStartJob() local 165 SharedPreferences.Editor editor = prefs.edit(); in onStartJob() 192 SharedPreferences prefs = mIdleJobContext.getSharedPreferences(PREFS_FILE_NAME, in doInBackground() local 200 editor = prefs.edit(); in doInBackground() 208 editor = prefs.edit(); in doInBackground()
|
/cts/hostsidetests/calllog/app/src/android/provider/cts/contacts/testapp/ |
D | BootReceiver.java | 22 SharedPreferences prefs = context.createDeviceProtectedStorageContext() in onReceive() local 24 prefs.edit().putBoolean(LOCKED_BOOT_COMPLETE, true).commit(); in onReceive() 40 SharedPreferences prefs = in waitForBootComplete() local 43 prefs.registerOnSharedPreferenceChangeListener( in waitForBootComplete() 49 if (prefs.getBoolean(action, false)) return true; in waitForBootComplete()
|
/cts/tests/inputmethod/mockspellchecker/src/com/android/cts/mockspellchecker/ |
D | SharedPrefsProvider.kt | 52 val prefs = getSharedPreferences(context) in getType() constant 53 val bytes = Base64.decode(prefs.getString(uri.path, ""), Base64.DEFAULT) in getType() 70 val prefs = getSharedPreferences(context) in update() constant 73 prefs.edit().putString(uri.path, str).apply() in update() 83 val prefs = getSharedPreferences(context) in delete() constant 84 prefs.edit().remove(uri.path).apply() in delete()
|
/cts/hostsidetests/backup/KeyValueApp/src/android/cts/backup/keyvaluerestoreapp/ |
D | KeyValueBackupRestoreTest.java | 229 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveSharedPreferencesValues() local 230 SharedPreferences.Editor editor = prefs.edit(); in saveSharedPreferencesValues() 235 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in saveSharedPreferencesValues() 236 editor = prefs.edit(); in saveSharedPreferencesValues() 256 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in readSharedPrefValues() local 257 mIntValue = prefs.getInt(INT_PREF, DEFAULT_INT_VALUE); in readSharedPrefValues() 258 mBoolValue = prefs.getBoolean(BOOL_PREF, DEFAULT_BOOL_VALUE); in readSharedPrefValues() 260 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in readSharedPrefValues() 261 mFloatValue = prefs.getFloat(FLOAT_PREF, DEFAULT_FLOAT_VALUE); in readSharedPrefValues() 262 mLongValue = prefs.getLong(LONG_PREF, DEFAULT_LONG_VALUE); in readSharedPrefValues() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/ |
D | PolicySerializationTestActivity.java | 112 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in loadPolicy() local 113 if (prefs.getBoolean(LOAD_EXPECTED_POLICY_PREFERENCE, false)) { in loadPolicy() 115 item.loadExpectedValue(prefs); in loadPolicy() 135 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in generateRandomPolicy() local 136 SharedPreferences.Editor editor = prefs.edit(); in generateRandomPolicy() 175 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in handleAddDeviceAdminResult() local 176 SharedPreferences.Editor editor = prefs.edit(); in handleAddDeviceAdminResult() 262 void loadExpectedValue(SharedPreferences prefs); in loadExpectedValue() argument 300 public final void loadExpectedValue(SharedPreferences prefs) { in loadExpectedValue() argument 301 mExpectedValue = getPreferencesValue(prefs); in loadExpectedValue() [all …]
|
/cts/hostsidetests/backup/RestoreAnyVersion/src/ |
D | RestoreAnyVersionTest.java | 102 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveAppVersionCodeToSharedPreference() local 103 SharedPreferences.Editor editor = prefs.edit(); in saveAppVersionCodeToSharedPreference() 111 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in getAppSharedPreference() local 112 int intValue = prefs.getInt(INT_PREF, DEFAULT_INT_VALUE); in getAppSharedPreference()
|
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/ |
D | CreatePrivateDataTest.java | 108 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in writeToPreferences() local 109 SharedPreferences.Editor editor = prefs.edit(); in writeToPreferences() 112 assertEquals(PREFERENCE_VALUE, prefs.getString(PREFERENCE_KEY, null)); in writeToPreferences() 149 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in assertPreferencesDataDoesNotExist() local 150 assertNull(prefs.getString(PREFERENCE_KEY, null)); in assertPreferencesDataDoesNotExist()
|
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/ |
D | BroadcastIntentReceiver.java | 37 SharedPreferences prefs = c.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE); in onReceive() local 38 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/ |
D | ConditionProviderVerifierActivity.java | 691 SharedPreferences prefs = mContext.getSharedPreferences(PREFS, Context.MODE_PRIVATE); in test() local 696 Log.d(TAG, "Check pref for broadcast " + prefs.contains(mId) in test() 697 + " " + prefs.getInt(mId, AUTOMATIC_RULE_STATUS_UNKNOWN)); in test() 698 if (prefs.contains(mId) in test() 699 && EXPECTED_STATUS == prefs.getInt(mId, AUTOMATIC_RULE_STATUS_UNKNOWN)) { in test() 720 SharedPreferences prefs = mContext.getSharedPreferences(PREFS, Context.MODE_PRIVATE); in tearDown() local 721 prefs.edit().clear().commit(); in tearDown() 768 SharedPreferences prefs = mContext.getSharedPreferences(PREFS, Context.MODE_PRIVATE); in test() local 773 Log.d(TAG, "Check pref for broadcast " + prefs.contains(mId) in test() 774 + " " + prefs.getInt(mId, AUTOMATIC_RULE_STATUS_UNKNOWN)); in test() [all …]
|
D | AutomaticZenRuleStatusReceiver.java | 34 SharedPreferences prefs = context.getSharedPreferences( in onReceive() local 36 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
|
D | BlockChangeReceiver.java | 33 SharedPreferences prefs = context.getSharedPreferences( in onReceive() local 35 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
|
D | NotificationListenerVerifierActivity.java | 384 SharedPreferences prefs = mContext.getSharedPreferences( in test() local 388 if (prefs.contains(mChannelId) && prefs.getBoolean(mChannelId, false)) { in test() 409 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown() local 411 SharedPreferences.Editor editor = prefs.edit(); in tearDown() 463 SharedPreferences prefs = mContext.getSharedPreferences( in test() local 467 if (prefs.contains(mGroupId) && prefs.getBoolean(mGroupId, false)) { in test() 488 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown() local 490 SharedPreferences.Editor editor = prefs.edit(); in tearDown() 610 SharedPreferences prefs = mContext.getSharedPreferences( in test() local 614 Log.d(TAG, "Got broadcast " + prefs.contains(mContext.getPackageName())); in test() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/ |
D | DetermineFovActivity.java | 185 SharedPreferences prefs = in getMarkerDistance() local 187 return Float.parseFloat(prefs.getString( in getMarkerDistance() 194 SharedPreferences prefs = in getTargetDistance() local 196 return Float.parseFloat(prefs.getString( in getTargetDistance()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | SecurityLoggingTest.java | 374 final SharedPreferences prefs = in testVerifyLogIds() local 383 prefs.contains(prevBatchLastIdKey)); in testVerifyLogIds() 384 final long prevBatchLastId = prefs.getLong(prevBatchLastIdKey, 0); in testVerifyLogIds() 391 prefs.edit().putLong(currBatchLastIdKey, lastId).commit(); in testVerifyLogIds()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | ByodFlowTestActivity.java | 889 final SharedPreferences prefs = getProvisioningPreferences(context); in markProvisioningCompleteBroadcastWithStatus() local 890 final SharedPreferences.Editor editor = prefs.edit(); in markProvisioningCompleteBroadcastWithStatus()
|