Merge "[Wi-Fi DPP] Wi-Fi QR code scanner is not working after a connection fail" into qt-dev

This commit is contained in:
Arc Wang
2019-06-20 01:34:09 +00:00
committed by Android (Google) Code Review

View File

@@ -686,6 +686,10 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
return;
}
if (mCamera.isDecodeTaskAlive()) {
mCamera.stop();
}
final SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();
if (surfaceTexture == null) {
throw new IllegalStateException("SurfaceTexture is not ready for restarting camera");