camera/camera-extensions/src/main/java/androidx/camera/extensions/ExtensionsInfo.java
/**
     * Returns true if the particular extension mode is available for the specified
     * {@link CameraSelector}.
     *
     * @param baseCameraSelector The base {@link CameraSelector} to find a camera to use.
     * @param mode               The target extension mode to support.
     */
Returns true if the particular extension mode is available for the specified
CameraSelector.

@param baseCameraSelector The base  CameraSelector to find a camera to use.
@param mode               The target extension mode to support.
Returns true if the particular extension mode is available for the specified CameraSelector . @param baseCameraSelector The base CameraSelector to find a camera to use . @param mode The target extension mode to support .
boolean isExtensionAvailable(
            @NonNull CameraSelector baseCameraSelector,
            @ExtensionMode.Mode int mode) {
        CameraSelector.Builder builder = CameraSelector.Builder.fromSelector(
                baseCameraSelector);
        builder.addCameraFilter(getFilter(mode));
        List<CameraInfo> cameraInfos = builder.build().filter(
                mCameraProvider.getAvailableCameraInfos());
        return !cameraInfos.isEmpty();
    }
boolean isExtensionAvailable ( @ NonNull CameraSelector baseCameraSelector , @ ExtensionMode . Mode int mode ) { CameraSelector . Builder builder = CameraSelector . Builder . fromSelector ( baseCameraSelector ) ; builder . addCameraFilter ( getFilter ( mode ) ) ; List < CameraInfo > cameraInfos = builder . build ( ) . filter ( mCameraProvider . getAvailableCameraInfos ( ) ) ; return ! cameraInfos . isEmpty ( ) ; }
Returns true if the particular extension mode is available for the specified
 {@link CameraSelector}.
Returns true if the particular extension mode is available for the specified { @link CameraSelector } .