Loading src/org/lineageos/updater/UpdatesDbHelper.java +7 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { public static final String COLUMN_NAME_TYPE = "type"; public static final String COLUMN_NAME_VERSION = "version"; public static final String COLUMN_NAME_DISPLAY_VERSION = "display_version"; public static final String COLUMN_NAME_ANDROID_VERSION = "android_version"; public static final String COLUMN_NAME_SIZE = "size"; } Loading @@ -55,6 +56,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TYPE + " TEXT," + UpdateEntry.COLUMN_NAME_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_DISPLAY_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_ANDROID_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_SIZE + " INTEGER)"; private static final String SQL_DELETE_ENTRIES = Loading Loading @@ -87,6 +89,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TYPE, update.getType()); values.put(UpdateEntry.COLUMN_NAME_VERSION, update.getVersion()); values.put(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, update.getDisplayVersion()); values.put(UpdateEntry.COLUMN_NAME_ANDROID_VERSION, update.getAndroidVersion()); values.put(UpdateEntry.COLUMN_NAME_SIZE, update.getFileSize()); return db.insert(UpdateEntry.TABLE_NAME, null, values); } Loading @@ -101,6 +104,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TYPE, update.getType()); values.put(UpdateEntry.COLUMN_NAME_VERSION, update.getVersion()); values.put(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, update.getDisplayVersion()); values.put(UpdateEntry.COLUMN_NAME_ANDROID_VERSION, update.getAndroidVersion()); values.put(UpdateEntry.COLUMN_NAME_SIZE, update.getFileSize()); return db.insertWithOnConflict(UpdateEntry.TABLE_NAME, null, values, conflictAlgorithm); } Loading Loading @@ -166,6 +170,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TYPE, UpdateEntry.COLUMN_NAME_VERSION, UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, UpdateEntry.COLUMN_NAME_ANDROID_VERSION, UpdateEntry.COLUMN_NAME_STATUS, UpdateEntry.COLUMN_NAME_SIZE, }; Loading @@ -189,6 +194,8 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { update.setVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION); update.setDisplayVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_ANDROID_VERSION); update.setAndroidVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_STATUS); update.setPersistentStatus(cursor.getInt(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_SIZE); Loading src/org/lineageos/updater/misc/BuildInfoUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,8 @@ public final class BuildInfoUtils { public static String getDisplayVersion() { return SystemProperties.get(Constants.PROP_BUILD_DISPLAY_VERSION); } public static String getAndroidVersion() { return SystemProperties.get(Constants.PROP_BUILD_ANDROID_VERSION); } } src/org/lineageos/updater/misc/Utils.java +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ public class Utils { update.setDownloadUrl(object.getString("url")); update.setVersion(object.getString("version")); update.setDisplayVersion(object.getString("display_version")); update.setDisplayVersion(object.getString("android_version")); return update; } Loading src/org/lineageos/updater/model/UpdateBase.java +12 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ public class UpdateBase implements UpdateBaseInfo { private String mType; private String mVersion; private String mDisplayVersion; private String mAndroidVersion; private long mFileSize; public UpdateBase() { Loading @@ -37,6 +38,7 @@ public class UpdateBase implements UpdateBaseInfo { mType = update.getType(); mVersion = update.getVersion(); mDisplayVersion = update.getDisplayVersion(); mAndroidVersion = update.getAndroidVersion(); mFileSize = update.getFileSize(); } Loading Loading @@ -94,6 +96,15 @@ public class UpdateBase implements UpdateBaseInfo { mDisplayVersion = displayVersion; } @Override public String getAndroidVersion() { return mAndroidVersion; } public void setAndroidVersion(String androidVersion) { mAndroidVersion = androidVersion; } @Override public String getDownloadUrl() { return mDownloadUrl; Loading src/org/lineageos/updater/model/UpdateBaseInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ public interface UpdateBaseInfo { String getDisplayVersion(); String getAndroidVersion(); String getDownloadUrl(); long getFileSize(); Loading Loading
src/org/lineageos/updater/UpdatesDbHelper.java +7 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { public static final String COLUMN_NAME_TYPE = "type"; public static final String COLUMN_NAME_VERSION = "version"; public static final String COLUMN_NAME_DISPLAY_VERSION = "display_version"; public static final String COLUMN_NAME_ANDROID_VERSION = "android_version"; public static final String COLUMN_NAME_SIZE = "size"; } Loading @@ -55,6 +56,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TYPE + " TEXT," + UpdateEntry.COLUMN_NAME_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_DISPLAY_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_ANDROID_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_SIZE + " INTEGER)"; private static final String SQL_DELETE_ENTRIES = Loading Loading @@ -87,6 +89,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TYPE, update.getType()); values.put(UpdateEntry.COLUMN_NAME_VERSION, update.getVersion()); values.put(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, update.getDisplayVersion()); values.put(UpdateEntry.COLUMN_NAME_ANDROID_VERSION, update.getAndroidVersion()); values.put(UpdateEntry.COLUMN_NAME_SIZE, update.getFileSize()); return db.insert(UpdateEntry.TABLE_NAME, null, values); } Loading @@ -101,6 +104,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TYPE, update.getType()); values.put(UpdateEntry.COLUMN_NAME_VERSION, update.getVersion()); values.put(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, update.getDisplayVersion()); values.put(UpdateEntry.COLUMN_NAME_ANDROID_VERSION, update.getAndroidVersion()); values.put(UpdateEntry.COLUMN_NAME_SIZE, update.getFileSize()); return db.insertWithOnConflict(UpdateEntry.TABLE_NAME, null, values, conflictAlgorithm); } Loading Loading @@ -166,6 +170,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TYPE, UpdateEntry.COLUMN_NAME_VERSION, UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, UpdateEntry.COLUMN_NAME_ANDROID_VERSION, UpdateEntry.COLUMN_NAME_STATUS, UpdateEntry.COLUMN_NAME_SIZE, }; Loading @@ -189,6 +194,8 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { update.setVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION); update.setDisplayVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_ANDROID_VERSION); update.setAndroidVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_STATUS); update.setPersistentStatus(cursor.getInt(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_SIZE); Loading
src/org/lineageos/updater/misc/BuildInfoUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,8 @@ public final class BuildInfoUtils { public static String getDisplayVersion() { return SystemProperties.get(Constants.PROP_BUILD_DISPLAY_VERSION); } public static String getAndroidVersion() { return SystemProperties.get(Constants.PROP_BUILD_ANDROID_VERSION); } }
src/org/lineageos/updater/misc/Utils.java +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ public class Utils { update.setDownloadUrl(object.getString("url")); update.setVersion(object.getString("version")); update.setDisplayVersion(object.getString("display_version")); update.setDisplayVersion(object.getString("android_version")); return update; } Loading
src/org/lineageos/updater/model/UpdateBase.java +12 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ public class UpdateBase implements UpdateBaseInfo { private String mType; private String mVersion; private String mDisplayVersion; private String mAndroidVersion; private long mFileSize; public UpdateBase() { Loading @@ -37,6 +38,7 @@ public class UpdateBase implements UpdateBaseInfo { mType = update.getType(); mVersion = update.getVersion(); mDisplayVersion = update.getDisplayVersion(); mAndroidVersion = update.getAndroidVersion(); mFileSize = update.getFileSize(); } Loading Loading @@ -94,6 +96,15 @@ public class UpdateBase implements UpdateBaseInfo { mDisplayVersion = displayVersion; } @Override public String getAndroidVersion() { return mAndroidVersion; } public void setAndroidVersion(String androidVersion) { mAndroidVersion = androidVersion; } @Override public String getDownloadUrl() { return mDownloadUrl; Loading
src/org/lineageos/updater/model/UpdateBaseInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ public interface UpdateBaseInfo { String getDisplayVersion(); String getAndroidVersion(); String getDownloadUrl(); long getFileSize(); Loading