зеркало из https://github.com/mozilla/pjs.git
bug 591153 - Show progress dialog on start up for android r=mwu a=blocking-fennec
This commit is contained in:
Родитель
1c03ad0a0d
Коммит
647844eb49
|
@ -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
|
||||
*
|
||||
|
@ -135,12 +135,12 @@ class GeckoSurfaceView
|
|||
mSurfaceLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void surfaceCreated(SurfaceHolder holder) {
|
||||
if (GeckoAppShell.sGeckoRunning)
|
||||
mSurfaceNeedsRedraw = true;
|
||||
}
|
||||
|
||||
|
||||
public void surfaceDestroyed(SurfaceHolder holder) {
|
||||
Log.i("GeckoAppJava", "surface destroyed");
|
||||
mSurfaceValid = false;
|
||||
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче