diff --git a/app/src/main/java/cc/jerryxiao/easterscrsaver/EasterDream.java b/app/src/main/java/cc/jerryxiao/easterscrsaver/EasterDream.java index bf95c24..b4ec3fe 100644 --- a/app/src/main/java/cc/jerryxiao/easterscrsaver/EasterDream.java +++ b/app/src/main/java/cc/jerryxiao/easterscrsaver/EasterDream.java @@ -119,8 +119,8 @@ public class EasterDream extends DreamService { enabled = true; WallpaperManager wallPaperManager = WallpaperManager.getInstance(this); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && wallPaperManager.isWallpaperSupported()) { - if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M || wallPaperManager.isWallpaperSupported()) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M || ActivityCompat.checkSelfPermission(this, android.Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { wallPaperDrawable = wallPaperManager.getDrawable(); } }