Home
last modified time | relevance | path

Searched refs:prefs (Results 1 – 25 of 34) sorted by relevance

12

/frameworks/opt/telephony/src/java/com/android/internal/telephony/util/
DVoicemailNotificationSettingsUtil.java48 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in setVibrationEnabled() local
49 SharedPreferences.Editor editor = prefs.edit(); in setVibrationEnabled()
61 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in getVibrationPreference() local
62 migrateVoicemailVibrationSettingsIfNeeded(context, prefs); in getVibrationPreference()
63 return prefs.getBoolean(getVoicemailVibrationSharedPrefsKey(), false /* defValue */); in getVibrationPreference()
67 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in setRingtoneUri() local
70 SharedPreferences.Editor editor = prefs.edit(); in setRingtoneUri()
82 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); in getRingTonePreference() local
83 migrateVoicemailRingtoneSettingsIfNeeded(context, prefs); in getRingTonePreference()
84 String uriString = prefs.getString( in getRingTonePreference()
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
DNekoService.java97 final PrefState prefs = new PrefState(context); in triggerFoodResponse() local
98 int food = prefs.getFoodState(); in triggerFoodResponse()
100 prefs.setFoodState(0); // nom in triggerFoodResponse()
104 List<Cat> cats = prefs.getCats(); in triggerFoodResponse()
106 final float waterLevel100 = prefs.getWaterState() / 2; // water is 0..200 in triggerFoodResponse()
114 cat = newRandomCat(context, prefs); in triggerFoodResponse()
117 cat = getExistingCat(prefs); in triggerFoodResponse()
132 static Cat newRandomCat(Context context, PrefState prefs) { in newRandomCat() argument
134 prefs.addCat(cat); in newRandomCat()
139 static Cat getExistingCat(PrefState prefs) { in getExistingCat() argument
[all …]
DNekoControlsService.kt80 private lateinit var prefs: PrefState variable in com.android.egg.neko.NekoControlsService
85 prefs = PrefState(this) in onCreate()
86 prefs.setListener(this) in onCreate()
96 val foodState: Int = prefs.foodState in createDefaultControls()
101 val water = prefs.waterState in createDefaultControls()
200 prefs.foodState = 11 in performControlAction()
209 NekoService.getExistingCat(prefs)?.let { in performControlAction()
220 prefs.waterState = action.newValue in performControlAction()
DNekoDialog.java52 PrefState prefs = new PrefState(getContext()); in onFoodSelected() local
53 int currentState = prefs.getFoodState(); in onFoodSelected()
58 prefs.setFoodState(food.getType()); in onFoodSelected()
/frameworks/base/packages/Shell/src/com/android/shell/
DBugreportPrefs.java37 final SharedPreferences prefs = context.getSharedPreferences( in getWarningState() local
39 return prefs.getInt(KEY_WARNING_STATE, def); in getWarningState()
43 final SharedPreferences prefs = context.getSharedPreferences( in setWarningState() local
45 prefs.edit().putInt(KEY_WARNING_STATE, value).apply(); in setWarningState()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DVolumePrefs.java53 prefs(c).unregisterOnSharedPreferenceChangeListener(listener); in unregisterCallbacks()
57 prefs(c).registerOnSharedPreferenceChangeListener(listener); in registerCallbacks()
60 private static SharedPreferences prefs(Context context) { in prefs() method in VolumePrefs
65 return prefs(context).getBoolean(key, def); in get()
/frameworks/base/services/net/java/android/net/
DConnectivityModuleConnector.java309 final SharedPreferences prefs = getSharedPreferences(); in maybeCrashWithTerribleFailure() local
310 final long lastCrashTime = tryGetLastCrashTime(prefs); in maybeCrashWithTerribleFailure()
334 tryWriteLastCrashTime(prefs, now); in maybeCrashWithTerribleFailure()
364 private long tryGetLastCrashTime(@Nullable SharedPreferences prefs) {
365 if (prefs == null) return 0L;
367 return prefs.getLong(PREF_KEY_LAST_CRASH_TIME, 0L);
374 private void tryWriteLastCrashTime(@Nullable SharedPreferences prefs, long value) {
375 if (prefs == null) return;
377 prefs.edit().putLong(PREF_KEY_LAST_CRASH_TIME, value).commit();
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DRemoveReceiver.java33 SharedPreferences prefs = context.getSharedPreferences( in onReceive() local
36 if (prefs.getBoolean(pkg, false)) { in onReceive()
37 prefs.edit().remove(pkg).apply(); in onReceive()
/frameworks/base/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/
DTestAppWidgetConfigure.java46 … SharedPreferences.Editor prefs = getSharedPreferences(TestAppWidgetProvider.PREFS_NAME, 0)
48 prefs.putString(TestAppWidgetProvider.PREF_PREFIX_KEY, text);
49 prefs.commit();
DTestAppWidgetProvider.java53 SharedPreferences prefs = context.getSharedPreferences( in onReceive() local
55 String prefix = prefs.getString(PREF_PREFIX_KEY, "hai"); in onReceive()
DAppWidgetHostActivity.java93 SharedPreferences.Editor prefs = getPreferences(0).edit(); in configureAppWidget() local
94 prefs.putInt(PENDING_APPWIDGET_ID, appWidgetId); in configureAppWidget()
95 prefs.commit(); in configureAppWidget()
/frameworks/base/tests/backup/src/com/android/backuptest/
DBackupTestActivity.java114 SharedPreferences prefs = getSharedPreferences(PREF_GROUP_SETTINGS, MODE_PRIVATE);
115 int val = prefs.getInt(PREF_KEY, 0);
123 SharedPreferences prefs = getSharedPreferences(PREF_GROUP_SETTINGS, MODE_PRIVATE);
124 int val = prefs.getInt(PREF_KEY, 0);
125 SharedPreferences.Editor editor = prefs.edit();
/frameworks/base/apct-tests/perftests/core/src/android/os/
DSharedPreferencesTest.java43 SharedPreferences prefs = context.getSharedPreferences("test", Context.MODE_PRIVATE); in timeCachedGetSharedPreferences() local
45 prefs = context.getSharedPreferences("test", Context.MODE_PRIVATE); in timeCachedGetSharedPreferences()
/frameworks/base/packages/WallpaperBackup/src/com/android/wallpaperbackup/
DWallpaperBackupAgent.java133 SharedPreferences prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); in onFullBackup() local
134 final int lastSysGeneration = prefs.getInt(SYSTEM_GENERATION, -1); in onFullBackup()
135 final int lastLockGeneration = prefs.getInt(LOCK_GENERATION, -1); in onFullBackup()
180 prefs.edit().putInt(SYSTEM_GENERATION, sysGeneration).apply(); in onFullBackup()
194 prefs.edit().putInt(LOCK_GENERATION, lockGeneration).apply(); in onFullBackup()
206 prefs.edit().putInt(LOCK_GENERATION, lockGeneration).apply(); in onFullBackup()
275 SharedPreferences prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); in onRestoreFinished() local
276 prefs.edit() in onRestoreFinished()
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZoneResultAdapter.java144 SharedPreferences prefs = mContext.getSharedPreferences(SHARED_PREFS_NAME, in onSetFilter() local
146 String recentsString = prefs.getString(KEY_RECENT_TIMEZONES, null); in onSetFilter()
197 SharedPreferences prefs = mContext.getSharedPreferences(SHARED_PREFS_NAME, in saveRecentTimezone() local
199 String recentsString = prefs.getString(KEY_RECENT_TIMEZONES, null); in saveRecentTimezone()
234 prefs.edit().putString(KEY_RECENT_TIMEZONES, recentsString).apply(); in saveRecentTimezone()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/
DMediaResumeListener.kt124 val prefs = context.getSharedPreferences(MEDIA_PREFERENCES, Context.MODE_PRIVATE) in isResumptionEnabled() constant
125 val listString = prefs.getString(MEDIA_PREFERENCE_KEY + currentUserId, null) in isResumptionEnabled()
228 val prefs = context.getSharedPreferences(MEDIA_PREFERENCES, Context.MODE_PRIVATE) in updateResumptionList() constant
229 prefs.edit().putString(MEDIA_PREFERENCE_KEY + currentUserId, sb.toString()).apply() in updateResumptionList()
/frameworks/multidex/library/src/androidx/multidex/
DMultiDexExtractor.java223 SharedPreferences prefs = getMultiDexPreferences(context); in isModified() local
224 return (prefs.getLong(prefsKeyPrefix + KEY_TIME_STAMP, NO_VALUE) != getTimeStamp(archive)) in isModified()
225 || (prefs.getLong(prefsKeyPrefix + KEY_CRC, NO_VALUE) != currentCrc); in isModified()
326 SharedPreferences prefs = getMultiDexPreferences(context); in putStoredApkInfo() local
327 SharedPreferences.Editor edit = prefs.edit(); in putStoredApkInfo()
/frameworks/base/services/core/java/com/android/server/notification/
DPreferencesHelper.java1672 PackagePreferences prefs = getOrCreatePackagePreferencesLocked(packageName, uid); in setAppImportanceLocked() local
1673 if ((prefs.lockedAppFields & LockableAppFields.USER_LOCKED_IMPORTANCE) != 0) { in setAppImportanceLocked()
1677 prefs.lockedAppFields = in setAppImportanceLocked()
1678 prefs.lockedAppFields | LockableAppFields.USER_LOCKED_IMPORTANCE; in setAppImportanceLocked()
1688 PackagePreferences prefs = getPackagePreferencesLocked(sourcePkg, sourceUid); in getNotificationDelegate() local
1690 if (prefs == null || prefs.delegate == null) { in getNotificationDelegate()
1693 if (!prefs.delegate.mUserAllowed || !prefs.delegate.mEnabled) { in getNotificationDelegate()
1696 return prefs.delegate.mPkg; in getNotificationDelegate()
1706 PackagePreferences prefs = getOrCreatePackagePreferencesLocked(sourcePkg, sourceUid); in setNotificationDelegate() local
1708 boolean userAllowed = prefs.delegate == null || prefs.delegate.mUserAllowed; in setNotificationDelegate()
[all …]
/frameworks/base/telephony/java/android/telephony/
DMbmsDownloadSession.java486 SharedPreferences prefs = mContext.getSharedPreferences( in setTempFileRootDirectory() local
488 prefs.edit().putString(MbmsTempFileProvider.TEMP_FILE_ROOT_PREF_NAME, filePath).apply(); in setTempFileRootDirectory()
520 SharedPreferences prefs = mContext.getSharedPreferences( in getTempFileRootDirectory() local
522 String path = prefs.getString(MbmsTempFileProvider.TEMP_FILE_ROOT_PREF_NAME, null); in getTempFileRootDirectory()
559 SharedPreferences prefs = mContext.getSharedPreferences( in download() local
561 if (prefs.getString(MbmsTempFileProvider.TEMP_FILE_ROOT_PREF_NAME, null) == null) { in download()
/frameworks/base/telephony/java/android/telephony/mbms/
DMbmsTempFileProvider.java177 SharedPreferences prefs = context.getSharedPreferences(TEMP_FILE_ROOT_PREF_FILE_NAME, 0); in getEmbmsTempFileDir() local
178 String storedTempFileRoot = prefs.getString(TEMP_FILE_ROOT_PREF_NAME, null); in getEmbmsTempFileDir()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/inputmethod/
DInputMethodAndSubtypeUtilCompat.java365 final SharedPreferences prefs = pref.getSharedPreferences(); in removeUnnecessaryNonPersistentPreference() local
366 if (prefs != null && prefs.contains(key)) { in removeUnnecessaryNonPersistentPreference()
367 prefs.edit().remove(key).apply(); in removeUnnecessaryNonPersistentPreference()
DInputMethodAndSubtypeUtil.java365 final SharedPreferences prefs = pref.getSharedPreferences(); in removeUnnecessaryNonPersistentPreference() local
366 if (prefs != null && prefs.contains(key)) { in removeUnnecessaryNonPersistentPreference()
367 prefs.edit().remove(key).apply(); in removeUnnecessaryNonPersistentPreference()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/
DSettingsInjector.java177 final List<Preference> prefs = new ArrayList<>(); in getInjectedSettings() local
182 prefs.add(preference); in getInjectedSettings()
185 if (!prefs.isEmpty()) { in getInjectedSettings()
186 result.put(userHandle.getIdentifier(), prefs); in getInjectedSettings() local
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DLocaleTracker.java612 final SharedPreferences prefs = mPhone.getContext().getSharedPreferences( in updateLastKnownCountryIso() local
614 final SharedPreferences.Editor editor = prefs.edit(); in updateLastKnownCountryIso()
629 final SharedPreferences prefs = mPhone.getContext().getSharedPreferences( in getLastKnownCountryIso() local
631 return prefs.getString(LAST_KNOWN_COUNTRY_ISO_SHARED_PREFS_KEY, ""); in getLastKnownCountryIso()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DDndTile.java118 public static boolean isVisible(SharedPreferences prefs) { in isVisible() argument
119 return prefs.getBoolean(Prefs.Key.DND_TILE_VISIBLE, false /* defaultValue */); in isVisible()

12