SurfaceSorter

@RequiresApi(value = 21) public class SurfaceSorter


Workaround that put Preview surface in front of the MediaCodec surface

Summary

Public methods

@NonNull void

Sorts the list to prevent from the device specific issue.

Public methods

sort

@NonNull
public void sort(@NonNull List<@NonNull DeferrableSurface> surfaces)

Sorts the list to prevent from the device specific issue.

Parameters
@NonNull List<@NonNull DeferrableSurface> surfaces

the input surface list to sort, must be a mutable list.