bug 591153 - Show progress dialog on start up for android r=mwu a=blocking-fennec

This commit is contained in:
Brad Lassey 2010-08-27 16:22:57 -04:00
Родитель 1c03ad0a0d
Коммит 647844eb49
2 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -1,4 +1,5 @@
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-/ * ***** BEGIN LICENSE BLOCK *****
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
@ -59,6 +60,7 @@ abstract public class GeckoApp
public static FrameLayout mainLayout;
public static GeckoSurfaceView surfaceView;
public static GeckoApp mAppContext;
ProgressDialog mProgressDialog;
void launch()
{
@ -102,6 +104,10 @@ abstract public class GeckoApp
ViewGroup.LayoutParams.FILL_PARENT));
if (!GeckoAppShell.sGeckoRunning) {
mProgressDialog =
ProgressDialog.show(GeckoApp.this, "", getAppName() +
" is loading", true);
// Load our JNI libs; we need to do this before launch() because
// setInitialSize will be called even before Gecko is actually up
// and running.

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: Java; tab-width: 20; indent-tabs-mode: nil; -*-
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@ -211,6 +211,10 @@ class GeckoSurfaceView
}
public void draw2D(ByteBuffer buffer) {
if (GeckoApp.mAppContext.mProgressDialog != null) {
GeckoApp.mAppContext.mProgressDialog.dismiss();
GeckoApp.mAppContext.mProgressDialog = null;
}
Canvas c = getHolder().lockCanvas();
if (c == null)
return;