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

Commit 1f8b21df authored by Suphon Thanakornpakapong's avatar Suphon Thanakornpakapong
Browse files

Add weather widget after ecloud and privacy widgets

parent 18428ba6
Loading
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -382,13 +382,6 @@ public class LauncherActivity extends AppCompatActivity implements
    }

    private void addDefaultWidgets() {
        if (!Preferences.getAddedWeatherWidget(this)) {
            ComponentName provider = new ComponentName(this, WeatherAppWidgetProvider.class);
            if (allocateAndBindWidget(provider)) {
                Preferences.setAddedWeatherWidget(this);
            }
        }

        if (!Preferences.getAddedEcloudWidget(this)) {
            ComponentName provider = new ComponentName("foundation.e.drive", "foundation.e.drive.widgets.EDriveWidget");
            if (allocateAndBindWidget(provider)) {
@@ -402,6 +395,13 @@ public class LauncherActivity extends AppCompatActivity implements
                Preferences.setAddedPrivacyWidget(this);
            }
        }

        if (!Preferences.getAddedWeatherWidget(this)) {
            ComponentName provider = new ComponentName(this, WeatherAppWidgetProvider.class);
            if (allocateAndBindWidget(provider)) {
                Preferences.setAddedWeatherWidget(this);
            }
        }
    }

    private boolean allocateAndBindWidget(ComponentName provider) {