Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

Camera2CameraFilter.Camera2Filter

public static interface Camera2CameraFilter.Camera2Filter

androidx.camera.camera2.interop.Camera2CameraFilter.Camera2Filter


An interface that filters cameras based on camera IDs and characteristics. Applications can implement the filter method for custom camera selection.

Summary

Public methods

abstract List<Camera2CameraInfo> filter(List<Camera2CameraInfo> cameraInfos)

Filters a list of Camera2CameraInfo then returns those matching the requirements.

Public methods

filter

public abstract List<Camera2CameraInfo> filter (List<Camera2CameraInfo> cameraInfos)

Filters a list of Camera2CameraInfo then returns those matching the requirements.

If the output list contains Camera2CameraInfo not in the input list, when used by a CameraSelector then it will result in an IllegalArgumentException thrown when calling bindToLifecycle.

The Camera2CameraInfo that has lower index in the map has higher priority. When used by CameraSelector.Builder.addCameraFilter(CameraFilter), the available cameras will be filtered by the Camera2CameraFilter.Camera2Filter and all other CameraFilters by the order they were added. The first camera in the result will be selected if there are multiple cameras left.

Parameters
cameraInfos List: An unmodifiable list of Camera2CameraInfos being filtered.

Returns
List<Camera2CameraInfo> The output map of camera IDs and their CameraCharacteristics that match the requirements. Users are expected to create a new map to return with.