fixed metrics disabler
This commit is contained in:
@@ -208,6 +208,10 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
|
||||
findPreference("analyticsDisabled").setVisible(!AndroidUtils.isDebuggable());
|
||||
findPreference("analyticsDisabled").setOnPreferenceClickListener(preference -> {
|
||||
restartApplicationWithTimer();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint({"CommitPrefEdits", "SetTextI18n"})
|
||||
|
||||
@@ -81,7 +81,6 @@ public class AnalyticsHelper {
|
||||
public static void setAnalyticsStatus(Boolean bool) {
|
||||
Analytics.setEnabled(bool && Preferences.isValidSignature());
|
||||
Crashes.setEnabled(bool && !AndroidUtils.isDebuggable() && Preferences.isValidSignature());
|
||||
Preferences.getPreferences().edit().putBoolean("analyticsDisabled", !bool).apply();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user