Loading app/src/apiNougat/java/foundation/e/blisslauncher/core/Preferences.java +9 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class Preferences { private static final String CURRENT_MIGRATION_VERSION = "current_migration_version"; private static final String ADDED_WEATHER_WIDGET = "added_weather_widget"; private static final String ADDED_ECLOUD_WIDGET = "added_ecloud_widget"; private static final String ADDED_PRIVACY_WIDGET = "added_privacy_widget"; Loading Loading @@ -364,6 +365,14 @@ public class Preferences { return getPrefs(context).getBoolean(ENABLE_LOCATION, false); } public static void setAddedWeatherWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_WEATHER_WIDGET, true).apply(); } public static boolean getAddedWeatherWidget(Context context) { return getPrefs(context).getBoolean(ADDED_WEATHER_WIDGET, false); } public static void setAddedEcloudWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_ECLOUD_WIDGET, true).apply(); } Loading app/src/apiOreo/java/foundation/e/blisslauncher/core/Preferences.java +9 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class Preferences { private static final String CURRENT_MIGRATION_VERSION = "current_migration_version"; private static final String ADDED_WEATHER_WIDGET = "added_weather_widget"; private static final String ADDED_ECLOUD_WIDGET = "added_ecloud_widget"; private static final String ADDED_PRIVACY_WIDGET = "added_privacy_widget"; Loading Loading @@ -364,6 +365,14 @@ public class Preferences { return getPrefs(context).getBoolean(ENABLE_LOCATION, false); } public static void setAddedWeatherWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_WEATHER_WIDGET, true).apply(); } public static boolean getAddedWeatherWidget(Context context) { return getPrefs(context).getBoolean(ADDED_WEATHER_WIDGET, false); } public static void setAddedEcloudWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_ECLOUD_WIDGET, true).apply(); } Loading app/src/main/java/foundation/e/blisslauncher/features/launcher/LauncherActivity.java +8 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ import foundation.e.blisslauncher.features.suggestions.SuggestionsResult; import foundation.e.blisslauncher.features.usagestats.AppUsageStats; import foundation.e.blisslauncher.features.weather.DeviceStatusService; import foundation.e.blisslauncher.features.weather.ForecastBuilder; import foundation.e.blisslauncher.features.weather.WeatherAppWidgetProvider; import foundation.e.blisslauncher.features.weather.WeatherPreferences; import foundation.e.blisslauncher.features.weather.WeatherSourceListenerService; import foundation.e.blisslauncher.features.weather.WeatherUpdateService; Loading Loading @@ -384,6 +385,13 @@ 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)) { Loading Loading
app/src/apiNougat/java/foundation/e/blisslauncher/core/Preferences.java +9 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class Preferences { private static final String CURRENT_MIGRATION_VERSION = "current_migration_version"; private static final String ADDED_WEATHER_WIDGET = "added_weather_widget"; private static final String ADDED_ECLOUD_WIDGET = "added_ecloud_widget"; private static final String ADDED_PRIVACY_WIDGET = "added_privacy_widget"; Loading Loading @@ -364,6 +365,14 @@ public class Preferences { return getPrefs(context).getBoolean(ENABLE_LOCATION, false); } public static void setAddedWeatherWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_WEATHER_WIDGET, true).apply(); } public static boolean getAddedWeatherWidget(Context context) { return getPrefs(context).getBoolean(ADDED_WEATHER_WIDGET, false); } public static void setAddedEcloudWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_ECLOUD_WIDGET, true).apply(); } Loading
app/src/apiOreo/java/foundation/e/blisslauncher/core/Preferences.java +9 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class Preferences { private static final String CURRENT_MIGRATION_VERSION = "current_migration_version"; private static final String ADDED_WEATHER_WIDGET = "added_weather_widget"; private static final String ADDED_ECLOUD_WIDGET = "added_ecloud_widget"; private static final String ADDED_PRIVACY_WIDGET = "added_privacy_widget"; Loading Loading @@ -364,6 +365,14 @@ public class Preferences { return getPrefs(context).getBoolean(ENABLE_LOCATION, false); } public static void setAddedWeatherWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_WEATHER_WIDGET, true).apply(); } public static boolean getAddedWeatherWidget(Context context) { return getPrefs(context).getBoolean(ADDED_WEATHER_WIDGET, false); } public static void setAddedEcloudWidget(Context context) { getPrefs(context).edit().putBoolean(ADDED_ECLOUD_WIDGET, true).apply(); } Loading
app/src/main/java/foundation/e/blisslauncher/features/launcher/LauncherActivity.java +8 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ import foundation.e.blisslauncher.features.suggestions.SuggestionsResult; import foundation.e.blisslauncher.features.usagestats.AppUsageStats; import foundation.e.blisslauncher.features.weather.DeviceStatusService; import foundation.e.blisslauncher.features.weather.ForecastBuilder; import foundation.e.blisslauncher.features.weather.WeatherAppWidgetProvider; import foundation.e.blisslauncher.features.weather.WeatherPreferences; import foundation.e.blisslauncher.features.weather.WeatherSourceListenerService; import foundation.e.blisslauncher.features.weather.WeatherUpdateService; Loading Loading @@ -384,6 +385,13 @@ 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)) { Loading