/frameworks/base/docs/html/training/basics/data-storage/ |
D | shared-preferences.jd | 13 <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/ |
D | DoNotDisturbController.java | 21 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()
|
D | Prefs.java | 20 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/ |
D | DoNotDisturb.java | 22 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/ |
D | SharedPreferencesCompat.java | 19 import android.content.SharedPreferences; 32 Class cls = SharedPreferences.Editor.class; 39 public static void apply(SharedPreferences.Editor editor) { in apply()
|
D | OperationScheduler.java | 19 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/ |
D | BugreportPrefs.java | 20 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/ |
D | SettingsActivity.java | 17 import android.content.SharedPreferences; 18 import android.content.SharedPreferences.OnSharedPreferenceChangeListener; 61 public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { in onSharedPreferenceChanged()
|
D | NetworkActivity.java | 22 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/ |
D | PreferenceManager.java | 23 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()
|
D | Preference.java | 23 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/ |
D | TestAppWidgetConfigure.java | 21 import android.content.SharedPreferences; 46 … SharedPreferences.Editor prefs = getSharedPreferences(TestAppWidgetProvider.PREFS_NAME, 0)
|
D | TestAppWidgetProvider.java | 23 import android.content.SharedPreferences; 53 SharedPreferences prefs = context.getSharedPreferences( in onReceive()
|
D | AppWidgetHostActivity.java | 23 import android.content.SharedPreferences; 93 SharedPreferences.Editor prefs = getPreferences(0).edit(); in configureAppWidget()
|
/frameworks/base/core/java/android/content/ |
D | SharedPreferences.java | 42 public interface SharedPreferences { interface 59 void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key); in onSharedPreferenceChanged()
|
/frameworks/base/services/java/com/android/server/ |
D | BootReceiver.java | 22 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/ |
D | BackupTestActivity.java | 26 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/ |
D | TrackerService.java | 26 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/ |
D | GSMPhone.java | 21 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/ |
D | data-storage.jd | 69 <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/ |
D | CDMALTEPhone.java | 21 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/ |
D | OperationSchedulerTest.java | 19 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/ |
D | TimeZoneResultAdapter.java | 20 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/ |
D | MediaDump.java | 21 import android.content.SharedPreferences;
|
/frameworks/base/packages/WAPPushManager/ |
D | proguard.flags | 6 -keep class android.content.SharedPreferences$Editor {
|