Class ShadowCaptureRequestBuilder

java.lang.Object
org.robolectric.shadows.ShadowCaptureRequestBuilder

@Implements(android.hardware.camera2.CaptureRequest.Builder.class) public class ShadowCaptureRequestBuilder extends Object
Shadow class for CaptureRequest.Builder.
  • Constructor Details

    • ShadowCaptureRequestBuilder

      public ShadowCaptureRequestBuilder()
  • Method Details

    • set

      @Implementation protected <T> void set(CaptureRequest.Key<T> key, T value)
      Original implementation would store its state in a local CameraMetadataNative object. Trying to set these values causes issues while testing as that starts to involve native code. We write to a managed map stored in the shadow instead.
    • get

      @Implementation protected <T> T get(CaptureRequest.Key<T> key)
      Original implementation would store its state in a local CameraMetadataNative object. Instead, we are extracting the data from a managed map stored in the shadow.