Google 致力于为黑人社区推动种族平等。查看具体举措

CameraFilter

interface CameraFilter
androidx.camera.core.CameraFilter

An interface for filtering cameras.

Summary

Public methods
abstract LinkedHashSet<Camera!>
filter(@NonNull cameras: LinkedHashSet<Camera!>)

Filters a set of Cameras and returns those matching the requirements.

Public methods

filter

@NonNull abstract fun filter(@NonNull cameras: LinkedHashSet<Camera!>): LinkedHashSet<Camera!>

Filters a set of Cameras and returns those matching the requirements.

If the output set contains cameras not in the input set, when used by a androidx.camera.core.CameraSelector then it will result in an IllegalArgumentException thrown when calling bindToLifecycle.

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

Parameters
cameras LinkedHashSet<Camera!>: The input set of Cameras being filtered. It's not expected to be modified.
Return
LinkedHashSet<Camera!> The output set of Cameras that match the requirements. Users are expected to create a new set to return with.