You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/01/11 19:25:01 UTC
[9/10] android commit: CB-2154: navigator.splashscreen.show() broken
in Phonegap 2.2 and 2.3.0rc2
CB-2154: navigator.splashscreen.show() broken in Phonegap 2.2 and 2.3.0rc2
Fixed the splashscreen so it will show for a minimum of 3 seconds if the user has not called loadUrl with a timeout in their main activity.
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/5ac6853f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/5ac6853f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/5ac6853f
Branch: refs/heads/master
Commit: 5ac6853fed423a02609b46110c959fee36133ead
Parents: b870214
Author: Simon MacDonald <si...@gmail.com>
Authored: Thu Jan 10 22:06:35 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Jan 11 10:24:03 2013 -0800
----------------------------------------------------------------------
framework/src/org/apache/cordova/DroidGap.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/5ac6853f/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java
index 175fe13..bd1cf79 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -40,6 +40,7 @@ import android.graphics.Color;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
+import android.util.Log;
import android.view.Display;
import android.view.KeyEvent;
import android.view.Menu;
@@ -169,7 +170,7 @@ public class DroidGap extends Activity implements CordovaInterface {
// Draw a splash screen using an image located in the drawable resource directory.
// This is not the same as calling super.loadSplashscreen(url)
protected int splashscreen = 0;
- protected int splashscreenTime = 0;
+ protected int splashscreenTime = 3000;
// LoadUrl timeout value in msec (default of 20 sec)
protected int loadUrlTimeoutValue = 20000;
@@ -1077,9 +1078,9 @@ public class DroidGap extends Activity implements CordovaInterface {
}
else {
// If the splash dialog is showing don't try to show it again
- if (this.splashDialog != null && !this.splashDialog.isShowing()) {
- this.splashscreen = this.getIntegerProperty("splashscreen", 0);
- this.showSplashScreen(this.splashscreenTime);
+ if (this.splashDialog == null || !this.splashDialog.isShowing()) {
+ this.splashscreen = this.getIntegerProperty("splashscreen", 0);
+ this.showSplashScreen(this.splashscreenTime);
}
}
}