Don't store multiple repo copies in memory

This commit is contained in:
topjohnwu
2017-07-21 02:46:02 +08:00
parent 8458553b74
commit da4f53ebbb
8 changed files with 78 additions and 71 deletions
@@ -35,11 +35,13 @@ public class Repo extends BaseModule {
Logger.dev("Repo: Fetching prop: " + getId());
}
public void update(Date lastUpdate) throws CacheModException {
public boolean update(Date lastUpdate) throws CacheModException {
if (lastUpdate.after(mLastUpdate)) {
mLastUpdate = lastUpdate;
update();
return true;
}
return false;
}
public ContentValues getContentValues() {