mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-11-27 21:53:00 +00:00
Apply preferences fix
This commit is contained in:
parent
42465a888c
commit
f21b5b2740
2 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue