Skip to content

Commit

Permalink
Issue #SB-3723 fix :Added Null check for Telemetry event generartion.
Browse files Browse the repository at this point in the history
  • Loading branch information
swayangjit committed Jun 13, 2018
1 parent 5564929 commit f45071f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/android/org/sunbird/SplashScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,26 @@ public void run() {

private void generateImpressionEvent() {
Impression impression = new Impression.Builder().type("view").pageId("splash").environment("home").build();
GenieService.getAsyncService().getTelemetryService().saveTelemetry(impression, new IResponseHandler<Void>() {
@Override
public void onSuccess(GenieResponse<Void> genieResponse) {
GenieAsyncService genieAsyncService = GenieService.getAsyncService();

}
if (genieAsyncService != null && genieAsyncService.getTelemetryService() != null) {

@Override
public void onError(GenieResponse<Void> genieResponse) {
genieAsyncService.getTelemetryService().saveTelemetry(impression, new IResponseHandler<Void>() {
@Override
public void onSuccess(GenieResponse<Void> genieResponse) {

}

@Override
public void onError(GenieResponse<Void> genieResponse) {

}
});
}

}
});
}


/**
* Shows the splash screen over the full Activity
*/
Expand Down

0 comments on commit f45071f

Please sign in to comment.