CB-11156 Change default FadeSplashScreenDuration value

This commit is contained in:
daserge
2016-04-27 11:55:31 +03:00
parent 3d924fce1b
commit 4adff6f1c9
3 changed files with 17 additions and 14 deletions
+2 -1
View File
@@ -52,6 +52,7 @@ public class SplashScreen extends CordovaPlugin {
// Enable functionality only if running on 4.x.x.
private static final boolean HAS_BUILT_IN_SPLASH_SCREEN = Integer.valueOf(CordovaWebView.CORDOVA_VERSION.split("\\.")[0]) < 4;
private static final int DEFAULT_SPLASHSCREEN_DURATION = 3000;
private static final int DEFAULT_FADE_DURATION = 500;
private static Dialog splashDialog;
private static ProgressDialog spinnerDialog;
private static boolean firstShow = true;
@@ -117,7 +118,7 @@ public class SplashScreen extends CordovaPlugin {
private int getFadeDuration () {
int fadeSplashScreenDuration = preferences.getBoolean("FadeSplashScreen", true) ?
preferences.getInteger("FadeSplashScreenDuration", DEFAULT_SPLASHSCREEN_DURATION) : 0;
preferences.getInteger("FadeSplashScreenDuration", DEFAULT_FADE_DURATION) : 0;
if (fadeSplashScreenDuration < 30) {
// [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10