@SuppressWarnings("deprecation") @SuppressLint("NewApi") public static boolean isScreenOn(@NonNull PowerManager pm) { return Device.hasKitKatWatchApi() ? pm.isInteractive() : pm.isScreenOn(); }
public PermissionNotificationListener(@NonNull Context context) { super(context); Check.getInstance().isTrue(Device.hasJellyBeanMR2Api()); mComponentString = new ComponentName(mContext, MediaService.class).flattenToString(); }