зеркало из https://github.com/mozilla/gecko-dev.git
Bug 880437 - Do not try to release an already released Camera on shutdown. r=blassey
This commit is contained in:
Родитель
de78bff8d5
Коммит
8bcd332fb1
|
@ -113,8 +113,10 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
|
|||
GeckoAppShell.getGeckoInterface().removeAppStateListener(captureAndroid.mAppStateListener);
|
||||
|
||||
captureAndroid.StopCapture();
|
||||
captureAndroid.camera.release();
|
||||
captureAndroid.camera = null;
|
||||
if (captureAndroid.camera != null) {
|
||||
captureAndroid.camera.release();
|
||||
captureAndroid.camera = null;
|
||||
}
|
||||
captureAndroid.context = 0;
|
||||
|
||||
View cameraView = GeckoAppShell.getGeckoInterface().getCameraView();
|
||||
|
@ -177,8 +179,10 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
|
|||
@Override
|
||||
public void onPause() {
|
||||
StopCapture();
|
||||
camera.release();
|
||||
camera = null;
|
||||
if (camera != null) {
|
||||
camera.release();
|
||||
camera = null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче