camera/camera-extensions/src/androidTest/java/androidx/camera/extensions/util/ExtensionsTestUtil.java
/**
     * Creates a {@link PreviewExtenderImpl} object for specific {@link ExtensionMode} and
     * camera id.
     *
     * @param extensionMode The extension mode for the created object.
     * @param cameraId The target camera id.
     * @param cameraCharacteristics The camera characteristics of the target camera.
     * @return A {@link PreviewExtenderImpl} object.
     */
Creates a  PreviewExtenderImpl object for specific  ExtensionMode and
camera id.

@param extensionMode The extension mode for the created object.
@param cameraId The target camera id.
@param cameraCharacteristics The camera characteristics of the target camera.
@return A  PreviewExtenderImpl object.
Creates a PreviewExtenderImpl object for specific ExtensionMode and camera id . @param extensionMode The extension mode for the created object . @param cameraId The target camera id . @param cameraCharacteristics The camera characteristics of the target camera . @return A PreviewExtenderImpl object .
@NonNull
    public static PreviewExtenderImpl createPreviewExtenderImpl(
            @ExtensionMode.Mode int extensionMode, @NonNull String cameraId,
            @NonNull CameraCharacteristics cameraCharacteristics) {
        PreviewExtenderImpl impl = null;
        switch (extensionMode) {
            case HDR:
                impl = new HdrPreviewExtenderImpl();
                break;
            case BOKEH:
                impl = new BokehPreviewExtenderImpl();
                break;
            case FACE_RETOUCH:
                impl = new BeautyPreviewExtenderImpl();
                break;
            case NIGHT:
                impl = new NightPreviewExtenderImpl();
                break;
            case AUTO:
                impl = new AutoPreviewExtenderImpl();
                break;
        }
        assertNotNull(impl);
        impl.init(cameraId, cameraCharacteristics);
        return impl;
    }
@ NonNull public static PreviewExtenderImpl createPreviewExtenderImpl ( @ ExtensionMode . Mode int extensionMode , @ NonNull String cameraId , @ NonNull CameraCharacteristics cameraCharacteristics ) { PreviewExtenderImpl impl = null ; switch ( extensionMode ) { case HDR : impl = new HdrPreviewExtenderImpl ( ) ; break ; case BOKEH : impl = new BokehPreviewExtenderImpl ( ) ; break ; case FACE_RETOUCH : impl = new BeautyPreviewExtenderImpl ( ) ; break ; case NIGHT : impl = new NightPreviewExtenderImpl ( ) ; break ; case AUTO : impl = new AutoPreviewExtenderImpl ( ) ; break ; } assertNotNull ( impl ) ; impl . init ( cameraId , cameraCharacteristics ) ; return impl ; }
Creates a {@link PreviewExtenderImpl} object for specific {@link ExtensionMode} and
 camera id.
Creates a { @link PreviewExtenderImpl } object for specific { @link ExtensionMode } and camera id .