Upgrade widget colors

This commit is contained in:
M66B 2021-03-28 21:28:46 +02:00
parent 9ddbcac7e0
commit 51d24e36b2
1 changed files with 13 additions and 0 deletions

View File

@ -454,6 +454,19 @@ public class ApplicationEx extends Application
} else if (version < 1539) {
if (!prefs.contains("double_back"))
editor.putBoolean("double_back", true);
} else if (version < 1540) {
Map<String, ?> all = prefs.getAll();
for (String key : all.keySet())
if (key.startsWith("widget.") && key.endsWith(".semi")) {
String[] k = key.split("\\.");
if (k.length == 3)
try {
int appWidgetId = Integer.parseInt(k[1]);
editor.remove("widget." + appWidgetId + ".background");
} catch (Throwable ex) {
Log.e(ex);
}
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)