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

am: 051d4c9b81

Change-Id: I4ead4b5896ac1c60b77d50d5df9c5cb55202c91c
This commit is contained in:
Arc Wang
2019-06-19 20:05:29 -07:00
committed by android-build-merger

View File

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