Home
last modified time | relevance | path

Searched refs:editor (Results 1 – 14 of 14) sorted by relevance

/cts/tests/tests/content/src/android/content/cts/
DSharedPreferencesTest.java104 SharedPreferences.Editor editor = prefs.edit().putString("test-key", null); in testPutNullRemovesKey() local
106 editor.commit(); in testPutNullRemovesKey()
114 public abstract void setUp(SharedPreferences.Editor editor); in setUp() argument
118 public abstract void subsequentEdit(SharedPreferences.Editor editor); in subsequentEdit() argument
128 SharedPreferences.Editor editor; in test() local
134 editor = prefs.edit(); in test()
135 setUp(editor); in test()
136 editor.commit(); in test()
145 editor = prefs.edit(); in test()
146 subsequentEdit(editor); in test()
[all …]
/cts/hostsidetests/backup/includeexcludeapp/src/android/cts/backup/includeexcludeapp/
DIncludeExcludeTest.java272 SharedPreferences.Editor editor = mIncludeSharedPref1.edit(); in generateSharedPrefs() local
273 editor.putInt(SHARED_PREF_KEY1, SHARED_PREF_VALUE1); in generateSharedPrefs()
274 editor.commit(); in generateSharedPrefs()
275 editor = mIncludeSharedPref2.edit(); in generateSharedPrefs()
276 editor.putInt(SHARED_PREF_KEY2, SHARED_PREF_VALUE2); in generateSharedPrefs()
277 editor.commit(); in generateSharedPrefs()
280 editor = mExcludeSharedPref1.edit(); in generateSharedPrefs()
281 editor.putInt(SHARED_PREF_KEY3, SHARED_PREF_VALUE3); in generateSharedPrefs()
282 editor.commit(); in generateSharedPrefs()
283 editor = mExcludeSharedPref2.edit(); in generateSharedPrefs()
[all …]
/cts/tests/sample/src/android/sample/
DSampleDeviceActivity.java49 Editor editor = mPreferences.edit(); in savePreference() local
51 editor.putString(key, value); in savePreference()
53 editor.commit(); in savePreference()
71 Editor editor = mPreferences.edit(); in clearPreferences() local
73 editor.clear(); in clearPreferences()
75 editor.commit(); in clearPreferences()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DBlockChangeReceiver.java19 SharedPreferences.Editor editor = prefs.edit(); in onReceive() local
23 editor.putBoolean(id, in onReceive()
27 editor.putBoolean(id, in onReceive()
31 editor.putBoolean(id, in onReceive()
34 editor.commit(); in onReceive()
DNotificationListenerVerifierActivity.java334 SharedPreferences.Editor editor = prefs.edit(); in tearDown() local
335 editor.remove(mChannelId); in tearDown()
413 SharedPreferences.Editor editor = prefs.edit(); in tearDown() local
414 editor.remove(mGroupId); in tearDown()
485 SharedPreferences.Editor editor = prefs.edit(); in tearDown() local
486 editor.remove(mContext.getPackageName()); in tearDown()
553 SharedPreferences.Editor editor = prefs.edit(); in tearDown() local
554 editor.remove(mContext.getPackageName()); in tearDown()
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DBroadcastIntentReceiver.java34 SharedPreferences.Editor editor = prefs.edit(); in onReceive() local
35 editor.putBoolean(OWNER_CHANGED_BROADCAST_RECEIVED_KEY, true); in onReceive()
36 editor.apply(); in onReceive()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/
DPolicySerializationTestActivity.java131 SharedPreferences.Editor editor = prefs.edit(); in generateRandomPolicy() local
132 editor.clear(); in generateRandomPolicy()
133 editor.putBoolean(LOAD_EXPECTED_POLICY_PREFERENCE, false); in generateRandomPolicy()
134 editor.apply(); in generateRandomPolicy()
164 SharedPreferences.Editor editor = prefs.edit(); in handleAddDeviceAdminResult() local
165 editor.clear(); in handleAddDeviceAdminResult()
166 editor.putBoolean(LOAD_EXPECTED_POLICY_PREFERENCE, true); in handleAddDeviceAdminResult()
168 item.saveExpectedValue(editor); in handleAddDeviceAdminResult()
170 editor.apply(); in handleAddDeviceAdminResult()
252 void saveExpectedValue(SharedPreferences.Editor editor); in saveExpectedValue() argument
[all …]
/cts/hostsidetests/backup/KeyValueApp/src/android/cts/backup/keyvaluerestoreapp/
DKeyValueBackupRestoreTest.java221 SharedPreferences.Editor editor = prefs.edit(); in saveSharedPreferencesValues() local
222 editor.putInt(INT_PREF, INT_PREF_VALUE); in saveSharedPreferencesValues()
223 editor.putBoolean(BOOL_PREF, BOOL_PREF_VALUE); in saveSharedPreferencesValues()
224 assertTrue("Error committing shared preference 1 value", editor.commit()); in saveSharedPreferencesValues()
227 editor = prefs.edit(); in saveSharedPreferencesValues()
228 editor.putFloat(FLOAT_PREF, FLOAT_PREF_VALUE); in saveSharedPreferencesValues()
229 editor.putLong(LONG_PREF, LONG_PREF_VALUE); in saveSharedPreferencesValues()
230 editor.putString(STRING_PREF, STRING_PREF_VALUE); in saveSharedPreferencesValues()
231 assertTrue("Error committing shared preference 2 value", editor.commit()); in saveSharedPreferencesValues()
/cts/hostsidetests/backup/ProfileKeyValueApp/src/android.cts.backup.profilekeyvalueapp/
DProfileKeyValueBackupRestoreTest.java59 SharedPreferences.Editor editor = mPreferences.edit(); in writeSharedPrefsAndAssertSuccess() local
60 editor.putInt(PREFS_USER_KEY, mUserId); in writeSharedPrefsAndAssertSuccess()
61 assertThat(editor.commit()).isTrue(); in writeSharedPrefsAndAssertSuccess()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/
DSimpleReaderActivity.java174 SharedPreferences.Editor editor = mPrefs.edit(); in onItemSelected() local
175 editor.putBoolean("typeB", false); in onItemSelected()
176 editor.commit(); in onItemSelected()
182 SharedPreferences.Editor editor = mPrefs.edit(); in onItemSelected() local
183 editor.putBoolean("typeB", true); in onItemSelected()
184 editor.commit(); in onItemSelected()
/cts/hostsidetests/backup/RestoreAnyVersion/src/
DRestoreAnyVersionTest.java103 SharedPreferences.Editor editor = prefs.edit(); in saveAppVersionCodeToSharedPreference() local
104 editor.putInt(INT_PREF, in saveAppVersionCodeToSharedPreference()
107 assertTrue("Error committing shared preference value", editor.commit()); in saveAppVersionCodeToSharedPreference()
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DCreatePrivateDataTest.java109 SharedPreferences.Editor editor = prefs.edit(); in writeToPreferences() local
110 editor.putString(PREFERENCE_KEY, PREFERENCE_VALUE); in writeToPreferences()
111 editor.commit(); in writeToPreferences()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/vr/
DVrListenerVerifierActivity.java694 SharedPreferences.Editor editor = sharedPref.edit(); in setStatusOfTest() local
695 editor.putString(key, stringStatus); in setStatusOfTest()
696 editor.apply(); in setStatusOfTest()
700 SharedPreferences.Editor editor = sharedPref.edit(); in clear() local
701 editor.clear(); in clear()
702 editor.apply(); in clear()
/cts/hostsidetests/media/bitstreams/app/src/android/media/cts/bitstreams/app/
DMediaBitstreamsDeviceSideTest.java199 Editor editor = settings.edit(); in setup() local
200 editor.putInt(lastCrash, n + 1); in setup()
201 editor.commit(); in setup()