Beispiel #1
0
    /**
     * Creates a camera source builder with the supplied context and detector. Camera preview images
     * will be streamed to the associated detector upon starting the camera source.
     */
    public Builder(Context context, Detector<?> detector) {
      if (context == null) {
        throw new IllegalArgumentException(
            "No context supplied."); // can't put it in string when context is null
      }
      if (detector == null) {
        throw new IllegalArgumentException("No detector supplied.");
      }

      mDetector = detector;
      mCameraSource.mContext = context;
    }