Revert "Camera2: Temporarily remove surface size 0 check"

This reverts commit bdabb0f582.
Bug: 35027811
Test: Use camera from hangouts
This commit is contained in:
Shuzhen Wang
2017-02-09 13:13:04 -08:00
parent 5d99e14ca9
commit 476bea8495

View File

@@ -259,6 +259,10 @@ public final class OutputConfiguration implements Parcelable {
throw new IllegalArgumentException("Unknow surface source class type");
}
if (surfaceSize.getWidth() == 0 || surfaceSize.getHeight() == 0) {
throw new IllegalArgumentException("Surface size needs to be non-zero");
}
mSurfaceGroupId = SURFACE_GROUP_ID_NONE;
mSurfaces = new ArrayList<Surface>();
mRotation = ROTATION_0;