From 1ce0a89d75c9174eab2cb262e072ba28f99338ec Mon Sep 17 00:00:00 2001 From: Donno <31142286+Donnnno@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:34:03 +0100 Subject: [PATCH] fix wallpapers pt 2 --- app/src/main/res/values/dashboard_configurations.xml | 2 +- gradlew | 0 .../java/candybar/lib/activities/CandyBarWallpaperActivity.java | 2 +- library/src/main/java/candybar/lib/helpers/WallpaperHelper.java | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 gradlew diff --git a/app/src/main/res/values/dashboard_configurations.xml b/app/src/main/res/values/dashboard_configurations.xml index 6d8a2e6..4b1752a 100644 --- a/app/src/main/res/values/dashboard_configurations.xml +++ b/app/src/main/res/values/dashboard_configurations.xml @@ -77,7 +77,7 @@ - https://delta-icons.github.io/wallpapers/config.json + true true diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/library/src/main/java/candybar/lib/activities/CandyBarWallpaperActivity.java b/library/src/main/java/candybar/lib/activities/CandyBarWallpaperActivity.java index 73c5351..1574164 100644 --- a/library/src/main/java/candybar/lib/activities/CandyBarWallpaperActivity.java +++ b/library/src/main/java/candybar/lib/activities/CandyBarWallpaperActivity.java @@ -304,7 +304,7 @@ public void onClick(View view) { p.updateItem(position, item); if (Preferences.get(this).isCropWallpaper()) { if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); } return; } diff --git a/library/src/main/java/candybar/lib/helpers/WallpaperHelper.java b/library/src/main/java/candybar/lib/helpers/WallpaperHelper.java index fe6d2f5..c9e627c 100644 --- a/library/src/main/java/candybar/lib/helpers/WallpaperHelper.java +++ b/library/src/main/java/candybar/lib/helpers/WallpaperHelper.java @@ -51,7 +51,7 @@ public static int getWallpaperType(@NonNull Context context) { String url = CandyBarApplication.getConfiguration().getConfigHandler().wallpaperJson(context); if (url.startsWith("assets://") || URLUtil.isValidUrl(url)) { return CLOUD_WALLPAPERS; - } else if (url.length() > 0) { + } else if (!url.isEmpty()) { return EXTERNAL_APP; } return UNKNOWN;