Fixed another update problem

This commit is contained in:
Ciaran Gultnieks 2012-08-26 14:06:23 +01:00
parent 86a68d8ed2
commit 75898b7b0c

View File

@ -568,11 +568,11 @@ public class DB {
app.marketVercode = c.getInt(c app.marketVercode = c.getInt(c
.getColumnIndex("marketVercode")); .getColumnIndex("marketVercode"));
String sAdded = c.getString(c.getColumnIndex("added")); String sAdded = c.getString(c.getColumnIndex("added"));
app.added = sAdded.length() == 0 ? null : mDateFormat app.added = (sAdded == null || sAdded.length() == 0) ? null : mDateFormat
.parse(sAdded); .parse(sAdded);
String sLastUpdated = c.getString(c String sLastUpdated = c.getString(c
.getColumnIndex("lastUpdated")); .getColumnIndex("lastUpdated"));
app.lastUpdated = sLastUpdated.length() == 0 ? null app.lastUpdated = (sLastUpdated == null || sLastUpdated.length() == 0) ? null
: mDateFormat.parse(sLastUpdated); : mDateFormat.parse(sLastUpdated);
app.hasUpdates = false; app.hasUpdates = false;
@ -603,7 +603,7 @@ public class DB {
.getColumnIndex("minSdkVersion")); .getColumnIndex("minSdkVersion"));
String sApkAdded = c2.getString(c2 String sApkAdded = c2.getString(c2
.getColumnIndex("added")); .getColumnIndex("added"));
apk.added = sApkAdded.length() == 0 ? null apk.added = (sApkAdded == null || sApkAdded.length() == 0) ? null
: mDateFormat.parse(sApkAdded); : mDateFormat.parse(sApkAdded);
apk.permissions = CommaSeparatedList.make(c2 apk.permissions = CommaSeparatedList.make(c2
.getString(c2.getColumnIndex("permissions"))); .getString(c2.getColumnIndex("permissions")));