Loading core/java/android/hardware/camera2/impl/CameraExtensionUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public final class CameraExtensionUtils { ImageWriter writer = null; Image img = null; SurfaceInfo surfaceInfo = new SurfaceInfo(); int nativeFormat = SurfaceUtils.getSurfaceFormat(s); int nativeFormat = SurfaceUtils.detectSurfaceFormat(s); int dataspace = SurfaceUtils.getSurfaceDataspace(s); Size surfaceSize = SurfaceUtils.getSurfaceSize(s); surfaceInfo.mFormat = nativeFormat; Loading core/java/android/hardware/camera2/utils/SurfaceUtils.java +17 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,23 @@ public class SurfaceUtils { return surfaceType; } /** * Detect and retrieve the Surface format without any * additional overrides. * * @param surface The surface to be queried for format. * @return format of the surface. * * @throws IllegalArgumentException if the surface is already abandoned. */ public static int detectSurfaceFormat(Surface surface) { checkNotNull(surface); int surfaceType = nativeDetectSurfaceType(surface); if (surfaceType == BAD_VALUE) throw new IllegalArgumentException("Surface was abandoned"); return surfaceType; } /** * Get the Surface dataspace. * Loading Loading
core/java/android/hardware/camera2/impl/CameraExtensionUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public final class CameraExtensionUtils { ImageWriter writer = null; Image img = null; SurfaceInfo surfaceInfo = new SurfaceInfo(); int nativeFormat = SurfaceUtils.getSurfaceFormat(s); int nativeFormat = SurfaceUtils.detectSurfaceFormat(s); int dataspace = SurfaceUtils.getSurfaceDataspace(s); Size surfaceSize = SurfaceUtils.getSurfaceSize(s); surfaceInfo.mFormat = nativeFormat; Loading
core/java/android/hardware/camera2/utils/SurfaceUtils.java +17 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,23 @@ public class SurfaceUtils { return surfaceType; } /** * Detect and retrieve the Surface format without any * additional overrides. * * @param surface The surface to be queried for format. * @return format of the surface. * * @throws IllegalArgumentException if the surface is already abandoned. */ public static int detectSurfaceFormat(Surface surface) { checkNotNull(surface); int surfaceType = nativeDetectSurfaceType(surface); if (surfaceType == BAD_VALUE) throw new IllegalArgumentException("Surface was abandoned"); return surfaceType; } /** * Get the Surface dataspace. * Loading