mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1042689 - Deal with a native stopCapture if the camera is paused. r=jesup
This commit is contained in:
parent
e6440c8710
commit
2b1a58480d
@ -224,6 +224,12 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback, AppStateL
|
||||
private synchronized boolean stopCapture() {
|
||||
Log.d(TAG, "stopCapture");
|
||||
if (camera == null) {
|
||||
if (mResumeCapture == true) {
|
||||
// We already got onPause, but now the native code wants us to stop.
|
||||
// Do not resume capturing when resuming the app.
|
||||
mResumeCapture = false;
|
||||
return true;
|
||||
}
|
||||
throw new RuntimeException("Camera is already stopped!");
|
||||
}
|
||||
Throwable error = null;
|
||||
|
Loading…
Reference in New Issue
Block a user