コード例 #1
0
 @SuppressWarnings("deprecation")
 @SuppressLint("NewApi")
 public static boolean isScreenOn(@NonNull PowerManager pm) {
   return Device.hasKitKatWatchApi() ? pm.isInteractive() : pm.isScreenOn();
 }
コード例 #2
0
  public PermissionNotificationListener(@NonNull Context context) {
    super(context);
    Check.getInstance().isTrue(Device.hasJellyBeanMR2Api());

    mComponentString = new ComponentName(mContext, MediaService.class).flattenToString();
  }