Commit 72364176 authored by Amit Kumar's avatar Amit Kumar

Active OpenWeatherMapProvider by default

Change-Id: Ib54c6c4c0f9524911876422b8f2d4c266c7491c5
parent 2d0cd922
......@@ -64,7 +64,14 @@ public class FinishActivity extends BaseSetupWizardActivity {
private final Handler mHandler = new Handler();
private volatile boolean mIsFinishing = false;
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);
......@@ -184,6 +191,7 @@ public class FinishActivity extends BaseSetupWizardActivity {
if (mEnableAccessibilityController != null) {
mEnableAccessibilityController.onDestroy();
}
setupWeatherProvider();
handlePrivacyGuard(mSetupWizardApp);
handleEnableMetrics(mSetupWizardApp);
handleNavKeys(mSetupWizardApp);
......@@ -196,6 +204,11 @@ public class FinishActivity extends BaseSetupWizardActivity {
startActivityForResult(intent, NEXT_REQUEST);
}
private void setupWeatherProvider() {
LineageSettings.Secure.putString(getContentResolver(),
LineageSettings.Secure.WEATHER_PROVIDER_SERVICE, OWM);
}
private static void handleEnableMetrics(SetupWizardApp setupWizardApp) {
CMSettings.Secure.putInt(setupWizardApp.getContentResolver(),
CMSettings.Secure.STATS_COLLECTION, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment