Merge "Hide Set Wallpaper in Settings suggestion if it is not allowed" into nyc-mr1-dev

This commit is contained in:
Tony Mak
2016-07-14 01:22:52 +00:00
committed by Android (Google) Code Review

View File

@@ -103,7 +103,8 @@ public class SuggestionsChecks {
IBinder b = ServiceManager.getService(Context.WALLPAPER_SERVICE);
IWallpaperManager service = Stub.asInterface(b);
try {
return service.getWallpaper(mCallback, WallpaperManager.FLAG_SYSTEM,
return !service.isSetWallpaperAllowed(mContext.getOpPackageName()) ||
service.getWallpaper(mCallback, WallpaperManager.FLAG_SYSTEM,
new Bundle(), mContext.getUserId()) != null;
} catch (RemoteException e) {
}