Skip to content

Commit

Permalink
Merge pull request #4 from vinayagasundar/fix/contentImportBlackScreen
Browse files Browse the repository at this point in the history
Issue #SB-3714 fix : handled black screen while Ecar import
  • Loading branch information
swayangjit authored May 26, 2018
2 parents eb9a1ba + a3eb861 commit 14b0aeb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/android/org/sunbird/SplashScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ public Object onMessage(String id, Object data) {
}

private void hide() {

// To avoid black screen while content importing
if (importingInProgress) {
return;
}

this.hideSplashScreen(false);
getView().setVisibility(View.VISIBLE);
}
Expand All @@ -193,6 +199,11 @@ public void onConfigurationChanged(Configuration newConfig) {
}

private void hideSplashScreen(final boolean forceHideImmediately) {
// To avoid black screen while content importing
if (importingInProgress) {
return;
}

cordova.getActivity().runOnUiThread(new Runnable() {
public void run() {
if (splashDialog != null) {
Expand Down Expand Up @@ -464,11 +475,13 @@ public void onImportFailure(ContentImportStatus status) {

@Override
public void onOutDatedEcarFound() {
importingInProgress = false;
hide();
}
}, intent, true);

if (isImport) {
displaySplashScreen();
importingInProgress = true;
importStatusTextView.setText("Importing lesson...");
}
Expand Down

0 comments on commit 14b0aeb

Please sign in to comment.