Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c229a0b7 authored by Aayush Gupta's avatar Aayush Gupta Committed by Nishith Khanna
Browse files

SetupWizard: Disable LineageOS metrics

Change-Id: I55ab0172bf0d8f44ff9180cec4d2985ae237094f
parent e559d5f2
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ public class SetupWizardUtils {
                    Settings.Secure.TV_USER_SETUP_COMPLETE, 1);
        }

        handleEnableMetrics(context);
        handleDisableMetrics(context);
        handleNavKeys(context);
        handleRecoveryUpdate();
        handleNavigationOption();
@@ -267,15 +267,9 @@ public class SetupWizardUtils {
                enabledState, DONT_KILL_APP);
    }

    private static void handleEnableMetrics(Context context) {
        Bundle privacyData = SetupWizardApp.getSettingsBundle();
        if (privacyData != null
                && privacyData.containsKey(KEY_SEND_METRICS)) {
    private static void handleDisableMetrics(Context context) {
        LineageSettings.Secure.putInt(context.getContentResolver(),
                    LineageSettings.Secure.STATS_COLLECTION,
                    privacyData.getBoolean(KEY_SEND_METRICS)
                            ? 1 : 0);
        }
            LineageSettings.Secure.STATS_COLLECTION, 0);
    }

    private static void handleNavKeys(Context context) {