You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2017/07/27 00:07:09 UTC

cordova-plugin-splashscreen git commit: CB-13094: (android) Don't show splash when activity being finished

Repository: cordova-plugin-splashscreen
Updated Branches:
  refs/heads/master 7c0ab0fa5 -> e5c6772f1


CB-13094: (android) Don't show splash when activity being finished


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/e5c6772f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/e5c6772f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/e5c6772f

Branch: refs/heads/master
Commit: e5c6772f177a58c663efd3dbb8dbbc03ff9b463e
Parents: 7c0ab0f
Author: Andrey Sharapov <an...@scat.su>
Authored: Mon Jul 24 16:36:34 2017 +0400
Committer: Andrey Sharapov <an...@scat.su>
Committed: Mon Jul 24 16:36:34 2017 +0400

----------------------------------------------------------------------
 src/android/SplashScreen.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/e5c6772f/src/android/SplashScreen.java
----------------------------------------------------------------------
diff --git a/src/android/SplashScreen.java b/src/android/SplashScreen.java
index 14b6379..b29f79e 100644
--- a/src/android/SplashScreen.java
+++ b/src/android/SplashScreen.java
@@ -270,6 +270,10 @@ public class SplashScreen extends CordovaPlugin {
 
         lastHideAfterDelay = hideAfterDelay;
 
+        // Prevent to show the splash dialog if the activity is in the process of finishing
+        if (cordova.getActivity().isFinishing()) {
+            return;
+        }
         // If the splash dialog is showing don't try to show it again
         if (splashDialog != null && splashDialog.isShowing()) {
             return;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org