fix android 5 wallpaper
This commit is contained in:
parent
183f98ac47
commit
2f43a89c03
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue