skip camera layout when preview is zero-sized

Closes #3648
Fixes #3624
// FREEBIE
This commit is contained in:
Jake McGinty 2015-07-13 11:30:39 -07:00 committed by Moxie Marlinspike
parent 5c3b96a947
commit 63515e967e

View File

@ -224,6 +224,11 @@ public class CameraView extends FrameLayout {
previewHeight = height;
}
if (previewHeight == 0 || previewWidth == 0) {
Log.w(TAG, "skipping layout due to zero-width/height preview size");
return;
}
boolean useFirstStrategy = (width * previewHeight > height * previewWidth);
boolean useFullBleed = getHost().useFullBleedPreview();