Skip to content

Commit

Permalink
chore: add logs to create default components
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacksgong committed Apr 8, 2018
1 parent c349807 commit 1fa61a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ public OkDownload build() {

okDownload.setMonitor(monitor);

Util.d("OkDownload", "downloadStore[" + downloadStore + "] connectionFactory["
+ connectionFactory);
return okDownload;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,19 @@ public static String humanReadableBytes(long bytes, boolean si) {
return new BreakpointStoreOnCache();
}

public static @NonNull DownloadStore createRemitDatabase(DownloadStore originStore) {
public static @NonNull DownloadStore createRemitDatabase(@NonNull DownloadStore originStore) {
DownloadStore finalStore = originStore;
try {
final Method createRemitSelf = originStore.getClass()
.getMethod("createRemitSelf");
return (DownloadStore) createRemitSelf.invoke(originStore);
finalStore = (DownloadStore) createRemitSelf.invoke(originStore);
} catch (IllegalAccessException ignored) {
} catch (NoSuchMethodException ignored) {
} catch (InvocationTargetException ignored) {
}

return originStore;
Util.d("Util", "Get final download store is " + finalStore);
return finalStore;
}

public static @NonNull DownloadConnection.Factory createDefaultConnectionFactory() {
Expand Down

0 comments on commit 1fa61a2

Please sign in to comment.