code: public static void setResultDisplayDurationInMs(Intent intent, long duration) {
      intent.putExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS, duration);
    }
docs: Set desired duration for which to pause after a successful scan to {@code Intent}.
  @param intent Target intent.
  @param duration Desired duration in milliseconds.