Skip to content

Commit

Permalink
feat: print sync to cache state to logcat when need_log is true
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacksgong committed Feb 1, 2018
1 parent 918d106 commit 2cbca6d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.liulishuo.filedownloader.model.ConnectionModel;
import com.liulishuo.filedownloader.model.FileDownloadModel;
import com.liulishuo.filedownloader.util.FileDownloadHelper;
import com.liulishuo.filedownloader.util.FileDownloadLog;
import com.liulishuo.filedownloader.util.FileDownloadProperties;
import com.liulishuo.filedownloader.util.FileDownloadUtils;

Expand Down Expand Up @@ -88,6 +89,10 @@ public RemitDatabase() {
}

private void syncCacheToDB(int id) {
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.d(this, "sync cache to db %d", id);
}

realDatabase.update(cachedDatabase.find(id));
final List<ConnectionModel> modelList = cachedDatabase.findConnectionModel(id);
realDatabase.removeConnections(id);
Expand Down

0 comments on commit 2cbca6d

Please sign in to comment.