/** * Requests a certain aspect ratio for the preview. You don't have to call this yourself, the * {@link VideoStream} will do it when it's needed. */ public void requestAspectRatio(double aspectRatio) { if (mVARM.getAspectRatio() != aspectRatio) { mVARM.setAspectRatio(aspectRatio); mHandler.post( new Runnable() { @Override public void run() { if (mAspectRatioMode == ASPECT_RATIO_PREVIEW) { requestLayout(); } } }); } }