code: @SuppressLint("NewApi") // Checking for an @hide API.
      public static Scheduler from(Looper looper, boolean async) {
          if (looper == null) throw new NullPointerException("looper == null");
          if (Build.VERSION.SDK_INT < 16) {
              async = false;
          } else if (async && Build.VERSION.SDK_INT < 22) {
              // Confirm that the method is available on this API level despite being @hide.
              Message message = Message.obtain();
              try {
                  message.setAsynchronous(true);
              } catch (NoSuchMethodError e) {
                  async = false;
              }
              message.recycle();
          }
          return new HandlerScheduler(new Handler(looper), async);
      }
docs: A {@link Scheduler} which executes actions on {@code looper}.
  
  @param async if true, the scheduler will use async messaging on API >= 16 to avoid VSYNC
  locking. On API < 16 this value is ignored.
  @see Message#setAsynchronous(boolean)