code: @SuppressLint("NewApi")
    public static void allowCoreThreadTimeout(ThreadPoolExecutor executor, boolean value) {
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
        executor.allowCoreThreadTimeOut(value);
      }
    }
docs: Compatibility helper function for
  {@link java.util.concurrent.ThreadPoolExecutor#allowCoreThreadTimeOut(boolean)}
  
  Only available on android-9+.
  
  @param executor the {@link java.util.concurrent.ThreadPoolExecutor}
  @param value true if should time out, else false