List of usage examples for android.app WallpaperManager getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.android.launcher3.Utilities.java
public static boolean isWallapaperAllowed(Context context) { if (isNycOrAbove()) { try {//from ww w .j a v a 2 s . c om WallpaperManager wm = context.getSystemService(WallpaperManager.class); return (Boolean) wm.getClass().getDeclaredMethod("isSetWallpaperAllowed").invoke(wm); } catch (Exception e) { } } return true; }