Home
last modified time | relevance | path

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

12

/cts/tests/tests/content/src/android/content/cts/
DSharedPreferencesTest.java96 SharedPreferences.Editor editor = prefs.edit().putString("test-key", null); in testPutNullRemovesKey() local
98 editor.commit(); in testPutNullRemovesKey()
106 public abstract void setUp(SharedPreferences.Editor editor); in setUp() argument
110 public abstract void subsequentEdit(SharedPreferences.Editor editor); in subsequentEdit() argument
120 SharedPreferences.Editor editor; in test() local
126 editor = prefs.edit(); in test()
127 setUp(editor); in test()
128 editor.commit(); in test()
137 editor = prefs.edit(); in test()
138 subsequentEdit(editor); in test()
[all …]
/cts/hostsidetests/backup/includeexcludeapp/src/android/cts/backup/includeexcludeapp/
DIncludeExcludeTest.java273 SharedPreferences.Editor editor = mIncludeSharedPref1.edit(); in generateSharedPrefs() local
274 editor.putInt(SHARED_PREF_KEY1, SHARED_PREF_VALUE1); in generateSharedPrefs()
275 editor.commit(); in generateSharedPrefs()
276 editor = mIncludeSharedPref2.edit(); in generateSharedPrefs()
277 editor.putInt(SHARED_PREF_KEY2, SHARED_PREF_VALUE2); in generateSharedPrefs()
278 editor.commit(); in generateSharedPrefs()
281 editor = mExcludeSharedPref1.edit(); in generateSharedPrefs()
282 editor.putInt(SHARED_PREF_KEY3, SHARED_PREF_VALUE3); in generateSharedPrefs()
283 editor.commit(); in generateSharedPrefs()
284 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/car/
DGarageModeChecker.java123 SharedPreferences.Editor editor = prefs.edit();
124 editor.putLong(PREFS_TERMINATION, System.currentTimeMillis());
125 editor.commit();
143 SharedPreferences.Editor editor = prefs.edit();
144 editor.putBoolean(PREFS_HAD_CONNECTIVITY, mHaveContinuousConnectivity);
145 editor.commit();
166 SharedPreferences.Editor editor = prefs.edit(); in onStartJob() local
167 editor.putLong(PREFS_GARAGE_MODE_START, System.currentTimeMillis()); in onStartJob()
168 editor.commit(); in onStartJob()
206 SharedPreferences.Editor editor = null; in doInBackground() local
[all …]
DGarageModeTestActivity.java87 SharedPreferences.Editor editor = prefs.edit(); in onCreate() local
88 editor.putLong(GarageModeChecker.PREFS_INITIATION, now); in onCreate()
89 editor.putLong(GarageModeChecker.PREFS_GARAGE_MODE_START, 0); in onCreate()
90 editor.putLong(GarageModeChecker.PREFS_GARAGE_MODE_END, 0); in onCreate()
91 editor.putLong(GarageModeChecker.PREFS_TERMINATION, 0); in onCreate()
92 editor.putBoolean(GarageModeChecker.PREFS_HAD_CONNECTIVITY, false); in onCreate()
93 editor.putLong(GarageModeChecker.PREFS_START_BOOT_COUNT, in onCreate()
95 editor.commit(); in onCreate()
/cts/tests/inputmethod/testapp/src/android/view/inputmethod/ctstestapp/
DTranslucentActivity.java38 final var editor = new EditText(this); in onCreate() local
39 editor.setHint("editText"); in onCreate()
40 editor.requestFocus(); in onCreate()
41 layout.addView(editor); in onCreate()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DBlockChangeReceiver.java35 SharedPreferences.Editor editor = prefs.edit(); in onReceive() local
39 editor.putBoolean(id, in onReceive()
43 editor.putBoolean(id, in onReceive()
47 editor.putBoolean(id, in onReceive()
50 editor.commit(); in onReceive()
DAutomaticZenRuleStatusReceiver.java36 SharedPreferences.Editor editor = prefs.edit(); in onReceive() local
43 editor.putInt(id, status); in onReceive()
44 editor.commit(); in onReceive()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39701/src/android/security/cts/CVE_2021_39701/
DPocService.java49 SharedPreferences.Editor editor = sharedPref.edit(); in setResult() local
50 editor.putInt(getString(R.string.flag), flag); in setResult()
51 editor.putString(getString(R.string.message), message); in setResult()
52 editor.commit(); in setResult()
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DBroadcastIntentReceiver.java38 SharedPreferences.Editor editor = prefs.edit(); in onReceive() local
39 editor.putBoolean(OWNER_CHANGED_BROADCAST_RECEIVED_KEY, true); in onReceive()
40 editor.apply(); in onReceive()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39797/test-app/src/android/security/cts/CVE_2021_39797_test/
DPocActivity.java45 SharedPreferences.Editor editor = prefs.edit(); in onCreate() local
46 editor.putInt(getString(R.string.taskId), getTaskId()); in onCreate()
47 editor.apply(); in onCreate()
50 SharedPreferences.Editor editor = prefs.edit(); in onCreate() local
51 editor.putBoolean(getString(R.string.flagTaskSwapped), true); in onCreate()
52 editor.apply(); in onCreate()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/
DPolicySerializationTestActivity.java136 SharedPreferences.Editor editor = prefs.edit(); in generateRandomPolicy() local
137 editor.clear(); in generateRandomPolicy()
139 editor.putBoolean(LOAD_EXPECTED_POLICY_PREFERENCE, false); in generateRandomPolicy()
140 editor.apply(); in generateRandomPolicy()
176 SharedPreferences.Editor editor = prefs.edit(); in handleAddDeviceAdminResult() local
177 editor.clear(); in handleAddDeviceAdminResult()
179 editor.putBoolean(LOAD_EXPECTED_POLICY_PREFERENCE, true); in handleAddDeviceAdminResult()
181 item.saveExpectedValue(editor); in handleAddDeviceAdminResult()
183 editor.apply(); in handleAddDeviceAdminResult()
264 void saveExpectedValue(SharedPreferences.Editor editor); in saveExpectedValue() argument
[all …]
/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/hostsidetests/backup/KeyValueApp/src/android/cts/backup/keyvaluerestoreapp/
DKeyValueBackupRestoreTest.java231 SharedPreferences.Editor editor = prefs.edit(); in saveSharedPreferencesValues() local
232 editor.putInt(INT_PREF, INT_PREF_VALUE); in saveSharedPreferencesValues()
233 editor.putBoolean(BOOL_PREF, BOOL_PREF_VALUE); in saveSharedPreferencesValues()
234 assertTrue("Error committing shared preference 1 value", editor.commit()); in saveSharedPreferencesValues()
237 editor = prefs.edit(); in saveSharedPreferencesValues()
238 editor.putFloat(FLOAT_PREF, FLOAT_PREF_VALUE); in saveSharedPreferencesValues()
239 editor.putLong(LONG_PREF, LONG_PREF_VALUE); in saveSharedPreferencesValues()
240 editor.putString(STRING_PREF, STRING_PREF_VALUE); in saveSharedPreferencesValues()
241 assertTrue("Error committing shared preference 2 value", editor.commit()); in saveSharedPreferencesValues()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DCtsInteractiveActivity.java65 Editor editor = getSharedPreferences("CTSInteractive", Context.MODE_PRIVATE).edit(); in onStart() local
66 editor.putString("ACTIVITY_NAME", activityName); in onStart()
68 editor.putString("DISPLAY_MODE", displayMode); in onStart()
78 editor.apply(); in onStart()
/cts/libs/install/testapp/src/com/android/cts/install/lib/testapp/
DCrashingMainActivity.java38 SharedPreferences.Editor editor = preferences.edit(); in incrementCountAndBroadcast() local
40 editor.putInt("crash_count", ++count).commit(); in incrementCountAndBroadcast()
/cts/tests/tests/widget/src/android/widget/cts/
DEditTextTest.java758 Editor editor = et.getEditorForTesting(); in testCursorNotBlinkingOnNewActivity_WithoutFocus() local
759 boolean cursorBlinking = editor.isBlinking(); in testCursorNotBlinkingOnNewActivity_WithoutFocus()
767 Editor editor = et.getEditorForTesting(); in testCursorBlinkingOnNewActivity_WithFocus() local
773 boolean cursorBlinking = editor.isBlinking(); in testCursorBlinkingOnNewActivity_WithFocus()
781 Editor editor = et.getEditorForTesting(); in testSuspendAndResumeBlinkingCursor() local
789 boolean cursorBlinking = editor.isBlinking(); in testSuspendAndResumeBlinkingCursor()
796 cursorBlinking = editor.isBlinking(); in testSuspendAndResumeBlinkingCursor()
812 cursorBlinking = editor.isBlinking(); in testSuspendAndResumeBlinkingCursor()
824 Editor editor = editText.getEditorForTesting(); in testCursorBlinking_ViewDynamicallyAdded_WithFocus() local
834 assertTrue(editor.isBlinking()); in testCursorBlinking_ViewDynamicallyAdded_WithFocus()
[all …]
/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/apps/CtsVerifier/src/com/android/cts/verifier/nfc/offhost/
DSimpleOffhostReaderActivity.java294 SharedPreferences.Editor editor = mPrefs.edit(); in onItemSelected() local
295 editor.putBoolean("typeB", false); in onItemSelected()
296 editor.commit(); in onItemSelected()
302 SharedPreferences.Editor editor = mPrefs.edit(); in onItemSelected() local
303 editor.putBoolean("typeB", true); in onItemSelected()
304 editor.commit(); in onItemSelected()
/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/tests/framework/base/windowmanager/src/android/server/wm/keyguard/
DKeyguardLockedTests.java460 EditText editor = new EditText(activity); in createViews() local
463 editor.setPrivateImeOptions( in createViews()
468 layout.addView(editor); in createViews()
476 editor.requestFocus(); in createViews()
477 return editor; in createViews()
/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/tests/framework/base/windowmanager/src/android/server/wm/insets/
DWindowInsetsControllerTests.java719 View editor = getOnMainSync(rootView::findFocus); in testShowIme_immediatelyAfterDetachAndReattach() local
720 ViewGroup parent = (ViewGroup) getOnMainSync(editor::getParent); in testShowIme_immediatelyAfterDetachAndReattach()
723 parent.removeView(editor); in testShowIme_immediatelyAfterDetachAndReattach()
730 parent.addView(editor); in testShowIme_immediatelyAfterDetachAndReattach()
731 editor.requestFocus(); in testShowIme_immediatelyAfterDetachAndReattach()
732 editor.getWindowInsetsController().show(ime()); in testShowIme_immediatelyAfterDetachAndReattach()
1106 EditText editor = new EditText(activity); in setViews() local
1107 editor.setPrivateImeOptions(privateImeOptions); in setViews()
1109 layout.addView(editor); in setViews()
1111 editor.requestFocus(); in setViews()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DAccessibilityInputMethodTest.java442 final var editor = new MyTestEditor(activity, editable); in testInvalidateInputMain()
443 editor.requestFocus(); in testInvalidateInputMain()
444 myEditorRef.set(editor); in testInvalidateInputMain()
446 layout.addView(editor); in testInvalidateInputMain()
DInputMethodStartInputLifecycleTest.java528 final MyTestEditor editor = new MyTestEditor(activity, editable); in testInvalidateInputMain()
529 editor.requestFocus(); in testInvalidateInputMain()
530 myEditorRef.set(editor); in testInvalidateInputMain()
532 layout.addView(editor); in testInvalidateInputMain()

12