camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/compat/workaround/WaitForRepeatingRequestStart.java
/**
     * For b/146773463: It needs to check all the releasing capture sessions are ready for
     * opening next capture session.
     */
For b/146773463: It needs to check all the releasing capture sessions are ready for
opening next capture session.
For b / 146773463 : It needs to check all the releasing capture sessions are ready for opening next capture session .
@NonNull
    public ListenableFuture<Void> openCaptureSession(
            @NonNull CameraDevice cameraDevice,
            @NonNull SessionConfigurationCompat sessionConfigurationCompat,
            @NonNull List<DeferrableSurface> deferrableSurfaces,
            @NonNull List<SynchronizedCaptureSession> closingSessions,
            @NonNull OpenCaptureSession openCaptureSession) {
        List<ListenableFuture<Void>> futureList = new ArrayList<>();
        for (SynchronizedCaptureSession session : closingSessions) {
            futureList.add(session.getOpeningBlocker());
        }
        return FutureChain.from(Futures.successfulAsList(futureList)).transformAsync(
                v -> openCaptureSession.run(cameraDevice, sessionConfigurationCompat,
                        deferrableSurfaces), CameraXExecutors.directExecutor());
    }
@ NonNull public ListenableFuture < Void > openCaptureSession ( @ NonNull CameraDevice cameraDevice , @ NonNull SessionConfigurationCompat sessionConfigurationCompat , @ NonNull List < DeferrableSurface > deferrableSurfaces , @ NonNull List < SynchronizedCaptureSession > closingSessions , @ NonNull OpenCaptureSession openCaptureSession ) { List < ListenableFuture < Void > > futureList = new ArrayList < > ( ) ; for ( SynchronizedCaptureSession session : closingSessions ) { futureList . add ( session . getOpeningBlocker ( ) ) ; } return FutureChain . from ( Futures . successfulAsList ( futureList ) ) . transformAsync ( v -> openCaptureSession . run ( cameraDevice , sessionConfigurationCompat , deferrableSurfaces ) , CameraXExecutors . directExecutor ( ) ) ; }
For b/146773463: It needs to check all the releasing capture sessions are ready for
 opening next capture session.
For b / 146773463 : It needs to check all the releasing capture sessions are ready for opening next capture session .