diff --git a/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java b/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java index 01dbcf3e..b0f30748 100644 --- a/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java +++ b/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java @@ -162,11 +162,11 @@ public class LoginActivity extends AssistantActivity { super.onHuaweiButtonClicked(); state++; if (state == 1) { - PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(HuaweiButtonPreference, true); + PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(HuaweiButtonPreference, true).apply(); if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(LoginButtonPreference, false)) { LastCheckinInfo.ClearCheckinInfo(this); CheckinClient.brandSpoof = true; - PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(LoginButtonPreference, true); + PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(LoginButtonPreference, true).apply(); } init(); } @@ -177,11 +177,11 @@ public class LoginActivity extends AssistantActivity { super.onNextButtonClicked(); state++; if (state == 1) { - PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(LoginButtonPreference, true); + PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(LoginButtonPreference, true).apply(); if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(HuaweiButtonPreference, false)) { LastCheckinInfo.ClearCheckinInfo(this); CheckinClient.brandSpoof = false; - PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(HuaweiButtonPreference, true); + PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean(HuaweiButtonPreference, true).apply(); } init(); } else if (state == -1) { diff --git a/play-services-core/src/main/java/org/microg/gms/gcm/GcmPrefs.java b/play-services-core/src/main/java/org/microg/gms/gcm/GcmPrefs.java index 285aeb0c..95034f3d 100644 --- a/play-services-core/src/main/java/org/microg/gms/gcm/GcmPrefs.java +++ b/play-services-core/src/main/java/org/microg/gms/gcm/GcmPrefs.java @@ -216,7 +216,7 @@ public class GcmPrefs implements SharedPreferences.OnSharedPreferenceChangeListe public static void setEnabled(Context context, boolean newStatus) { boolean changed = GcmPrefs.get(context).isEnabled() != newStatus; - PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(GcmPrefs.PREF_ENABLE_GCM, newStatus).commit(); + PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(GcmPrefs.PREF_ENABLE_GCM, newStatus).apply(); if (!changed) return; if (!newStatus) { McsService.stop(context);