mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-02-02 22:17:31 +01:00
Partially revert "Other preferences fixes"
This commit is contained in:
parent
039b8772d8
commit
7a7f663c72
@ -216,15 +216,7 @@ public class GcmPrefs implements SharedPreferences.OnSharedPreferenceChangeListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setEnabled(Context context, boolean newStatus) {
|
public static void setEnabled(Context context, boolean newStatus) {
|
||||||
boolean changed = false;
|
boolean changed = GcmPrefs.get(context).isEnabled() != newStatus;
|
||||||
if (!PreferenceManager.getDefaultSharedPreferences(context).getBoolean(START_PREF_ENABLE_GCM, true)) {
|
|
||||||
changed = GcmPrefs.get(context).isEnabled() != newStatus;
|
|
||||||
} else {
|
|
||||||
if (GcmPrefs.get(context).isEnabled()) {
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(START_PREF_ENABLE_GCM, false).apply();
|
|
||||||
}
|
|
||||||
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(GcmPrefs.PREF_ENABLE_GCM, newStatus).apply();
|
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(GcmPrefs.PREF_ENABLE_GCM, newStatus).apply();
|
||||||
if (!changed) return;
|
if (!changed) return;
|
||||||
if (!newStatus) {
|
if (!newStatus) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user