Skip to content

Commit

Permalink
CB-11326 Prevent crash when initializing plugin after navigating to a…
Browse files Browse the repository at this point in the history
…nother URL
  • Loading branch information
vladimir-kotikov committed Jun 8, 2016
1 parent 4102589 commit b7ace24
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/android/SplashScreen.java
Expand Up @@ -83,7 +83,13 @@ protected void pluginInitialize() {
return;
}
// Make WebView invisible while loading URL
getView().setVisibility(View.INVISIBLE);
// CB-11326 Ensure we're calling this on UI thread
cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
getView().setVisibility(View.INVISIBLE);
}
});
int drawableId = preferences.getInteger("SplashDrawableId", 0);
if (drawableId == 0) {
String splashResource = preferences.getString("SplashScreen", "screen");
Expand Down

0 comments on commit b7ace24

Please sign in to comment.