Google is committed to advancing racial equity for Black communities. See how.

OperationCanceledException

class OperationCanceledException : Exception
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ androidx.camera.core.CameraControl.OperationCanceledException

An exception representing a failure that the operation is canceled which might be caused by a new value is set or camera is closed.

This is different from CancellationException. While CancellationException means the ListenableFuture was cancelled by Future#cancel(boolean), OperationCanceledException occurs when there is something wrong inside CameraControl and it has to cancel the operation.

Summary