am 9eb32c96: am a2f2141c: Merge "More SharedPreferences commit() -> apply() changes." into gingerbread
Merge commit '9eb32c96c872512c8aedc8627a4b96e9ea2a1a28' * commit '9eb32c96c872512c8aedc8627a4b96e9ea2a1a28': More SharedPreferences commit() -> apply() changes.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -285,7 +285,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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1406,7 +1406,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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -129,7 +129,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) ||
|
||||
|
||||
@@ -809,7 +809,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());
|
||||
}
|
||||
|
||||
@@ -832,7 +832,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() {
|
||||
|
||||
Reference in New Issue
Block a user