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

Commit 86306dcd authored by Clark Scheff's avatar Clark Scheff
Browse files

Themes: Use first asset entry for lockscreen wallpaper

The current implementation assumes the wallpaper will be named
either wallpaper.png or wallpaper.jpg.  If this is not the case
the wallpaper is not applied.  This patch implements the lockscreen
wallpaper the same way that the regular wallpaper is done.

Change-Id: I9f3dd299c1e61158fa53c163f7e42e21e2f9b1dc
parent e6c1c031
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -513,19 +513,10 @@ public class ThemeUtils {
    }

    public static String getLockscreenWallpaperPath(AssetManager assetManager) throws IOException {
        final String WALLPAPER_JPG = "wallpaper.jpg";
        final String WALLPAPER_PNG = "wallpaper.png";

        String[] assets = assetManager.list("lockscreen");
        if (assets == null || assets.length == 0) return null;
        for (String asset : assets) {
            if (WALLPAPER_JPG.equals(asset)) {
                return "lockscreen/" + WALLPAPER_JPG;
            } else if (WALLPAPER_PNG.equals(asset)) {
                return "lockscreen/" + WALLPAPER_PNG;
            }
        }
        return null;

        return "lockscreen/" + assets[0];
    }

    public static String getWallpaperPath(AssetManager assetManager) throws IOException {