Bug 694795 - Black rectangle in top left corner after opening a link from another app [r=mbrubeck]

This commit is contained in:
Fabrice Desré
2011-11-04 16:46:34 -07:00
parent c8afead95f
commit ce78b17ef7
2 changed files with 24 additions and 3 deletions

View File

@@ -1475,6 +1475,14 @@ public class GeckoAppShell
static int[] initCamera(String aContentType, int aCamera, int aWidth, int aHeight) {
Log.i("GeckoAppJava", "initCamera(" + aContentType + ", " + aWidth + "x" + aHeight + ") on thread " + Thread.currentThread().getId());
getMainHandler().post(new Runnable() {
public void run() {
try {
GeckoApp.mAppContext.enableCameraView();
} catch (Exception e) {}
}
});
// [0] = 0|1 (failure/success)
// [1] = width
// [2] = height
@@ -1562,6 +1570,13 @@ public class GeckoAppShell
static synchronized void closeCamera() {
Log.i("GeckoAppJava", "closeCamera() on thread " + Thread.currentThread().getId());
getMainHandler().post(new Runnable() {
public void run() {
try {
GeckoApp.mAppContext.disableCameraView();
} catch (Exception e) {}
}
});
if (sCamera != null) {
sCamera.stopPreview();
sCamera.release();