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

Commit 67e26c84 authored by Amit Kumar's avatar Amit Kumar Committed by Romain Hunault
Browse files

Active OpenWeatherMapProvider by default

Change-Id: Idfea84b0d279fdd3904e83e56d3b170a0243e579
parent 7886a8a2
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -62,6 +62,11 @@ public class FinishActivity extends BaseSetupWizardActivity {

    private boolean hasError   = false;

    // Component name of default weather provider.
    private static final String OWM =
            "org.lineageos.openweathermapprovider/org.lineageos.openweathermapprovider"
                    + ".OpenWeatherMapProviderService";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -182,6 +187,7 @@ public class FinishActivity extends BaseSetupWizardActivity {
        if (mEnableAccessibilityController != null) {
            mEnableAccessibilityController.onDestroy();
        }
        setupWeatherProvider();
        handlePrivacyGuard(mSetupWizardApp);
        handleEnableMetrics(mSetupWizardApp);
        handleNavKeys(mSetupWizardApp);
@@ -194,6 +200,11 @@ public class FinishActivity extends BaseSetupWizardActivity {
        startActivityForResult(intent, NEXT_REQUEST);
    }

    private void setupWeatherProvider() {
        LineageSettings.Secure.putString(getContentResolver(),
                        LineageSettings.Secure.WEATHER_PROVIDER_SERVICE, "dummmy");
    }

    private static void handleEnableMetrics(SetupWizardApp setupWizardApp) {
        LineageSettings.Secure.putInt(setupWizardApp.getContentResolver(),
            LineageSettings.Secure.STATS_COLLECTION, 0);