diff options
author | Brad Fitzpatrick <bradfitz@android.com> | 2010-09-03 12:49:44 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-03 12:49:44 -0700 |
commit | 9eb32c96c872512c8aedc8627a4b96e9ea2a1a28 (patch) | |
tree | 436b51aaabedf3d682181ba37852b1f814a8d5f5 | |
parent | e7884d68a613e579a12a52455f6b5b13a90a0f8a (diff) | |
parent | a2f2141c84923e34e003bec92b7435ea79b02ee8 (diff) | |
download | frameworks_base-9eb32c96c872512c8aedc8627a4b96e9ea2a1a28.zip frameworks_base-9eb32c96c872512c8aedc8627a4b96e9ea2a1a28.tar.gz frameworks_base-9eb32c96c872512c8aedc8627a4b96e9ea2a1a28.tar.bz2 |
am a2f2141c: Merge "More SharedPreferences commit() -> apply() changes." into gingerbread
Merge commit 'a2f2141c84923e34e003bec92b7435ea79b02ee8' into gingerbread-plus-aosp
* commit 'a2f2141c84923e34e003bec92b7435ea79b02ee8':
More SharedPreferences commit() -> apply() changes.
5 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/preference/PreferenceManager.java b/core/java/android/preference/PreferenceManager.java index 2b20946..fa83897 100644 --- a/core/java/android/preference/PreferenceManager.java +++ b/core/java/android/preference/PreferenceManager.java @@ -443,7 +443,7 @@ public class PreferenceManager { pm.setSharedPreferencesMode(sharedPreferencesMode); pm.inflateFromResource(context, resId, null); - defaultValueSp.edit().putBoolean(KEY_HAS_SET_DEFAULT_VALUES, true).commit(); + defaultValueSp.edit().putBoolean(KEY_HAS_SET_DEFAULT_VALUES, true).apply(); } } @@ -481,7 +481,7 @@ public class PreferenceManager { private void setNoCommit(boolean noCommit) { if (!noCommit && mEditor != null) { - mEditor.commit(); + mEditor.apply(); } mNoCommit = noCommit; diff --git a/telephony/java/com/android/internal/telephony/PhoneBase.java b/telephony/java/com/android/internal/telephony/PhoneBase.java index c3c8f5e..1da9d4d 100644 --- a/telephony/java/com/android/internal/telephony/PhoneBase.java +++ b/telephony/java/com/android/internal/telephony/PhoneBase.java @@ -286,7 +286,7 @@ public abstract class PhoneBase extends Handler implements Phone { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor editor = sp.edit(); editor.putBoolean(DNS_SERVER_CHECK_DISABLED_KEY, b); - editor.commit(); + editor.apply(); } /** diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java index 840d366..fc955db 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java @@ -1412,7 +1412,7 @@ public class CDMAPhone extends PhoneBase { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor editor = sp.edit(); editor.putString(VM_NUMBER_CDMA, number); - editor.commit(); + editor.apply(); } /** diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java index 8eaf4a2..dceff2a 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java @@ -127,7 +127,7 @@ final class CdmaSMSDispatcher extends SMSDispatcher { mPhone.getContext()); SharedPreferences.Editor editor = sp.edit(); editor.putInt(CDMAPhone.VM_COUNT_CDMA, voicemailCount); - editor.commit(); + editor.apply(); ((CDMAPhone) mPhone).updateMessageWaitingIndicator(voicemailCount); handled = true; } else if (((SmsEnvelope.TELESERVICE_WMT == teleService) || diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java index 6665632..4a31735 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java +++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java @@ -807,7 +807,7 @@ public class GSMPhone extends PhoneBase { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor editor = sp.edit(); editor.putString(VM_NUMBER, number); - editor.commit(); + editor.apply(); setVmSimImsi(getSubscriberId()); } @@ -830,7 +830,7 @@ public class GSMPhone extends PhoneBase { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor editor = sp.edit(); editor.putString(VM_SIM_IMSI, imsi); - editor.commit(); + editor.apply(); } public String getVoiceMailAlphaTag() { |