зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1042689 - Deal with a native stopCapture if the camera is paused. r=jesup
This commit is contained in:
Родитель
e95941b7a3
Коммит
81f4f63679
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче