Home
last modified time | relevance | path

Searched refs:SharedPreferences (Results 1 – 25 of 64) sorted by relevance

123

/frameworks/base/docs/html/training/basics/data-storage/
Dshared-preferences.jd13 <li><a href="#GetSharedPreferences">Get a Handle to a SharedPreferences</a></li>
28 you should use the {@link android.content.SharedPreferences} APIs.
29 A {@link android.content.SharedPreferences} object points to a file containing
31 {@link android.content.SharedPreferences} file is
34 <p>This class shows you how to use the {@link android.content.SharedPreferences} APIs to store and
37 <p class="note"><strong>Note:</strong> The {@link android.content.SharedPreferences} APIs are
40 for your app settings (although they use {@link android.content.SharedPreferences} as their
45 <h2 id="GetSharedPreferences">Get a Handle to a SharedPreferences</h2>
67 SharedPreferences sharedPref = context.getSharedPreferences(
78 SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DDoNotDisturbController.java21 import android.content.SharedPreferences;
30 SharedPreferences.OnSharedPreferenceChangeListener {
33 SharedPreferences mPrefs;
58 SharedPreferences.Editor editor = Prefs.edit(mContext); in onCheckedChanged()
64 public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { in onSharedPreferenceChanged()
DPrefs.java20 import android.content.SharedPreferences;
32 public static SharedPreferences read(Context context) { in read()
36 public static SharedPreferences.Editor edit(Context context) { in edit()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DDoNotDisturb.java22 import android.content.SharedPreferences;
29 public class DoNotDisturb implements SharedPreferences.OnSharedPreferenceChangeListener {
32 SharedPreferences mPrefs;
44 public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { in onSharedPreferenceChanged()
/frameworks/ex/common/java/com/android/common/
DSharedPreferencesCompat.java19 import android.content.SharedPreferences;
32 Class cls = SharedPreferences.Editor.class;
39 public static void apply(SharedPreferences.Editor editor) { in apply()
DOperationScheduler.java19 import android.content.SharedPreferences;
77 private final SharedPreferences mStorage;
83 public OperationScheduler(SharedPreferences storage) { in OperationScheduler()
319 SharedPreferences.Editor editor = mStorage.edit(); in onTransientError()
/frameworks/base/packages/Shell/src/com/android/shell/
DBugreportPrefs.java20 import android.content.SharedPreferences;
35 final SharedPreferences prefs = context.getSharedPreferences( in getWarningState()
41 final SharedPreferences prefs = context.getSharedPreferences( in setWarningState()
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/
DSettingsActivity.java17 import android.content.SharedPreferences;
18 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
61 public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged()
DNetworkActivity.java22 import android.content.SharedPreferences;
100 SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); in onStart()
226 SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); in loadXmlFromNetwork()
/frameworks/base/core/java/android/preference/
DPreferenceManager.java23 import android.content.SharedPreferences;
87 private SharedPreferences mSharedPreferences;
93 private SharedPreferences.Editor mEditor;
351 public SharedPreferences getSharedPreferences() { in getSharedPreferences()
368 public static SharedPreferences getDefaultSharedPreferences(Context context) { in getDefaultSharedPreferences()
478 final SharedPreferences defaultValueSp = context.getSharedPreferences( in setDefaultValues()
487 SharedPreferences.Editor editor = in setDefaultValues()
508 SharedPreferences.Editor getEditor() { in getEditor()
DPreference.java23 import android.content.SharedPreferences;
1012 public SharedPreferences getSharedPreferences() { in getSharedPreferences()
1039 public SharedPreferences.Editor getEditor() { in getEditor()
1347 private void tryCommit(SharedPreferences.Editor editor) { in tryCommit()
1381 SharedPreferences.Editor editor = mPreferenceManager.getEditor(); in persistString()
1433 SharedPreferences.Editor editor = mPreferenceManager.getEditor(); in persistStringSet()
1482 SharedPreferences.Editor editor = mPreferenceManager.getEditor(); in persistInt()
1526 SharedPreferences.Editor editor = mPreferenceManager.getEditor(); in persistFloat()
1570 SharedPreferences.Editor editor = mPreferenceManager.getEditor(); in persistLong()
1614 SharedPreferences.Editor editor = mPreferenceManager.getEditor(); in persistBoolean()
/frameworks/base/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/
DTestAppWidgetConfigure.java21 import android.content.SharedPreferences;
46SharedPreferences.Editor prefs = getSharedPreferences(TestAppWidgetProvider.PREFS_NAME, 0)
DTestAppWidgetProvider.java23 import android.content.SharedPreferences;
53 SharedPreferences prefs = context.getSharedPreferences( in onReceive()
DAppWidgetHostActivity.java23 import android.content.SharedPreferences;
93 SharedPreferences.Editor prefs = getPreferences(0).edit(); in configureAppWidget()
/frameworks/base/core/java/android/content/
DSharedPreferences.java42 public interface SharedPreferences { interface
59 void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key); in onSharedPreferenceChanged()
/frameworks/base/services/java/com/android/server/
DBootReceiver.java22 import android.content.SharedPreferences;
98 final SharedPreferences prefs = ctx.getSharedPreferences("log_files", Context.MODE_PRIVATE); in logBootEvents()
159 DropBoxManager db, SharedPreferences prefs, in addFileToDropBox()
179 private static void addAuditErrorsToDropBox(DropBoxManager db, SharedPreferences prefs, in addAuditErrorsToDropBox()
/frameworks/base/tests/backup/src/com/android/backuptest/
DBackupTestActivity.java26 import android.content.SharedPreferences;
114 SharedPreferences prefs = getSharedPreferences(PREF_GROUP_SETTINGS, MODE_PRIVATE);
123 SharedPreferences prefs = getSharedPreferences(PREF_GROUP_SETTINGS, MODE_PRIVATE);
125 SharedPreferences.Editor editor = prefs.edit();
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/
DTrackerService.java26 import android.content.SharedPreferences;
27 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
183 private SharedPreferences getPreferences() { in getPreferences()
437 SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/gsm/
DGSMPhone.java21 import android.content.SharedPreferences;
805 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); in storeVoiceMailNumber()
806 SharedPreferences.Editor editor = sp.edit(); in storeVoiceMailNumber()
818 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); in getVoiceMailNumber()
825 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); in getVmSimImsi()
830 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); in setVmSimImsi()
831 SharedPreferences.Editor editor = sp.edit(); in setVmSimImsi()
1206 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); in syncClirSetting()
1475 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); in handleSetSelectNetwork()
1476 SharedPreferences.Editor editor = sp.edit(); in handleSetSelectNetwork()
[all …]
/frameworks/base/docs/html/guide/topics/data/
Ddata-storage.jd69 <p>The {@link android.content.SharedPreferences} class provides a general framework that allows you
71 android.content.SharedPreferences} to save any primitive data: booleans, floats, ints, longs, and
84 <p>To get a {@link android.content.SharedPreferences} object for your application, use one of
97 <li>Call {@link android.content.SharedPreferences#edit()} to get a {@link
98 android.content.SharedPreferences.Editor}.</li>
100 android.content.SharedPreferences.Editor#putBoolean(String,boolean) putBoolean()} and {@link
101 android.content.SharedPreferences.Editor#putString(String,String) putString()}.</li>
102 <li>Commit the new values with {@link android.content.SharedPreferences.Editor#commit()}</li>
105 <p>To read values, use {@link android.content.SharedPreferences} methods such as {@link
106 android.content.SharedPreferences#getBoolean(String,boolean) getBoolean()} and {@link
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cdma/
DCDMALTEPhone.java21 import android.content.SharedPreferences;
194 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); in handleSetSelectNetwork()
195 SharedPreferences.Editor editor = sp.edit(); in handleSetSelectNetwork()
/frameworks/ex/common/tests/src/com/android/common/
DOperationSchedulerTest.java19 import android.content.SharedPreferences;
38 private SharedPreferences getFreshStorage() { in getFreshStorage()
39 SharedPreferences sp = getContext().getSharedPreferences("OperationSchedulerTest", 0); in getFreshStorage()
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZoneResultAdapter.java20 import android.content.SharedPreferences;
144 SharedPreferences prefs = mContext.getSharedPreferences(SHARED_PREFS_NAME, in onSetFilter()
197 SharedPreferences prefs = mContext.getSharedPreferences(SHARED_PREFS_NAME, in saveRecentTimezone()
/frameworks/base/media/tests/MediaDump/src/com/android/mediadump/
DMediaDump.java21 import android.content.SharedPreferences;
/frameworks/base/packages/WAPPushManager/
Dproguard.flags6 -keep class android.content.SharedPreferences$Editor {

123