Skip to content

Commit

Permalink
Catch ReferrerClient.startConnection exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kenumir committed Feb 8, 2018
1 parent 515f813 commit ede84f3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/src/main/java/com/wt/pinger/activity/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ public boolean onTabSelected(int position, boolean wasSelected) {
}

mReferrerClient = InstallReferrerClient.newBuilder(this).build();
mReferrerClient.startConnection(this);
try {
mReferrerClient.startConnection(this);
} catch (Exception e) {
ERA.logException(e);
}

ERA.log("MainActivity.onCreate:end");
}
Expand Down Expand Up @@ -198,7 +202,11 @@ public void run() {
Console.logi("onInstallReferrerServiceDisconnected, retry - startConnection");
}
ERA.log("onInstallReferrerServiceDisconnected: retry connect");
mReferrerClient.startConnection(MainActivity.this);
try {
mReferrerClient.startConnection(MainActivity.this);
} catch (Exception e) {
ERA.logException(e);
}
}
}
}, 5_000);
Expand Down

0 comments on commit ede84f3

Please sign in to comment.