OutputConfigurationCompat { public int getMaxSharedSurfaceCount() { return mImpl.getMaxSharedSurfaceCount(); } OutputConfigurationCompat(@NonNull Surface surface); @RequiresApi(26) <T> OutputConfigurationCompat(@NonNull Size surfaceSize, @NonNull Class<T> klass); private  OutputConfigurationCompat(@NonNull OutputConfigurationCompatImpl impl); @Nullable static OutputConfigurationCompat wrap(@Nullable Object outputConfiguration); void enableSurfaceSharing(); @RestrictTo(Scope.LIBRARY) @Nullable String getPhysicalCameraId(); void setPhysicalCameraId(@Nullable String physicalCameraId); void addSurface(@NonNull Surface surface); void removeSurface(@NonNull Surface surface); int getMaxSharedSurfaceCount(); @Nullable Surface getSurface(); @NonNull List<Surface> getSurfaces(); int getSurfaceGroupId(); @Override boolean equals(Object obj); @Override int hashCode(); @Nullable Object unwrap(); static final int SURFACE_GROUP_ID_NONE; }
@Test @Config(minSdk = 26, maxSdk = 26) public void sharedSurfaceCount_canBeRetrievedOnApi26() { Surface surface = mock(Surface.class); OutputConfigurationCompat outputConfigCompat = new OutputConfigurationCompat(surface); assertThat(outputConfigCompat.getMaxSharedSurfaceCount()).isEqualTo(2); }