Class ShadowCaptureRequestBuilder


  • @Implements(value=android.hardware.camera2.CaptureRequest.Builder.class,
                minSdk=21)
    public class ShadowCaptureRequestBuilder
    extends java.lang.Object
    Shadow class for CaptureRequest.Builder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected <T> T get​(android.hardware.camera2.CaptureRequest.Key<T> key)
      Original implementation would store its state in a local CameraMetadataNative object.
      protected <T> void set​(android.hardware.camera2.CaptureRequest.Key<T> key, T value)
      Original implementation would store its state in a local CameraMetadataNative object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowCaptureRequestBuilder

        public ShadowCaptureRequestBuilder()
    • Method Detail

      • set

        @Implementation
        protected <T> void set​(android.hardware.camera2.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​(android.hardware.camera2.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.