Simplification

This commit is contained in:
M66B
2022-10-30 17:52:24 +01:00
parent 0293c52651
commit 1d30749958
6 changed files with 33 additions and 39 deletions

View File

@@ -51,12 +51,8 @@ public class WidgetSync extends AppWidgetProvider {
for (int appWidgetId : appWidgetIds) {
boolean daynight = prefs.getBoolean("widget." + appWidgetId + ".daynight", false);
boolean semi = prefs.getBoolean("widget." + appWidgetId + ".semi",
Build.VERSION.SDK_INT < Build.VERSION_CODES.S);
int background = prefs.getInt("widget." + appWidgetId + ".background",
Build.VERSION.SDK_INT < Build.VERSION_CODES.S
? Color.TRANSPARENT
: ColorUtils.setAlphaComponent(Color.BLACK, 127));
boolean semi = prefs.getBoolean("widget." + appWidgetId + ".semi", true);
int background = prefs.getInt("widget." + appWidgetId + ".background", Color.TRANSPARENT);
int version = prefs.getInt("widget." + appWidgetId + ".version", 0);
if (version <= 1550)