Merge \\"Hide Set Wallpaper in Settings suggestion if it is not allowed\\" into nyc-mr1-dev am: 1a8be1e372

am: 494fed5682

Change-Id: I34d7fc9602adaa3d78d1cc05069ac34d5bf7c6db
This commit is contained in:
Tony Mak
2016-07-14 01:48:33 +00:00
committed by android-build-merger

View File

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