camera/camera-extensions/src/main/java/androidx/camera/extensions/ExtensionsInfo.java
/**
     * Injects {@link CameraConfigProvider} for specified extension mode to the
     * {@link ExtendedCameraConfigProviderStore}.
     */
Injects  CameraConfigProvider for specified extension mode to the
ExtendedCameraConfigProviderStore.
Injects CameraConfigProvider for specified extension mode to the ExtendedCameraConfigProviderStore .
private static void injectExtensionCameraConfig(@ExtensionMode.Mode int mode) {
        Identifier id = Identifier.create(getExtendedCameraConfigProviderId(mode));
        if (ExtendedCameraConfigProviderStore.getConfigProvider(id) == CameraConfigProvider.EMPTY) {
            ExtendedCameraConfigProviderStore.addConfig(id, (cameraInfo, context) -> {
                VendorExtender vendorExtender = getVendorExtender(mode);
                vendorExtender.init(cameraInfo);
                ExtensionsUseCaseConfigFactory factory = new
                        ExtensionsUseCaseConfigFactory(mode, vendorExtender, context);
                ExtensionsConfig.Builder builder = new ExtensionsConfig.Builder()
                        .setExtensionMode(mode)
                        .setUseCaseConfigFactory(factory)
                        .setCompatibilityId(id)
                        .setZslDisabled(true)
                        .setUseCaseCombinationRequiredRule(
                                CameraConfig.REQUIRED_RULE_COEXISTING_PREVIEW_AND_IMAGE_CAPTURE);
                SessionProcessor sessionProcessor = vendorExtender.createSessionProcessor(context);
                if (sessionProcessor != null) {
                    builder.setSessionProcessor(sessionProcessor);
                }
                return builder.build();
            });
        }
    }
private static void injectExtensionCameraConfig ( @ ExtensionMode . Mode int mode ) { Identifier id = Identifier . create ( getExtendedCameraConfigProviderId ( mode ) ) ; if ( ExtendedCameraConfigProviderStore . getConfigProvider ( id ) == CameraConfigProvider . EMPTY ) { ExtendedCameraConfigProviderStore . addConfig ( id , ( cameraInfo , context ) -> { VendorExtender vendorExtender = getVendorExtender ( mode ) ; vendorExtender . init ( cameraInfo ) ; ExtensionsUseCaseConfigFactory factory = new ExtensionsUseCaseConfigFactory ( mode , vendorExtender , context ) ; ExtensionsConfig . Builder builder = new ExtensionsConfig . Builder ( ) . setExtensionMode ( mode ) . setUseCaseConfigFactory ( factory ) . setCompatibilityId ( id ) . setZslDisabled ( true ) . setUseCaseCombinationRequiredRule ( CameraConfig . REQUIRED_RULE_COEXISTING_PREVIEW_AND_IMAGE_CAPTURE ) ; SessionProcessor sessionProcessor = vendorExtender . createSessionProcessor ( context ) ; if ( sessionProcessor != null ) { builder . setSessionProcessor ( sessionProcessor ) ; } return builder . build ( ) ; } ) ; } }
Injects {@link CameraConfigProvider} for specified extension mode to the
 {@link ExtendedCameraConfigProviderStore}.
Injects { @link CameraConfigProvider } for specified extension mode to the { @link ExtendedCameraConfigProviderStore } .