Loading src/org/lineageos/updater/UpdatesActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class UpdatesActivity extends UpdatesListActivity { TextView headerTitle = (TextView) findViewById(R.id.header_title); headerTitle.setText(getString(R.string.header_title_text, BuildInfoUtils.getBuildVersion())); BuildInfoUtils.getDisplayVersion())); updateLastCheckedString(); Loading src/org/lineageos/updater/UpdatesDbHelper.java +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { public static final String COLUMN_NAME_TIMESTAMP = "timestamp"; 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_SIZE = "size"; } Loading @@ -53,6 +54,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TIMESTAMP + " INTEGER," + UpdateEntry.COLUMN_NAME_TYPE + " TEXT," + UpdateEntry.COLUMN_NAME_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_DISPLAY_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_SIZE + " INTEGER)"; private static final String SQL_DELETE_ENTRIES = Loading Loading @@ -84,6 +86,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TIMESTAMP, update.getTimestamp()); 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_SIZE, update.getFileSize()); return db.insert(UpdateEntry.TABLE_NAME, null, values); } Loading @@ -97,6 +100,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TIMESTAMP, update.getTimestamp()); 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_SIZE, update.getFileSize()); return db.insertWithOnConflict(UpdateEntry.TABLE_NAME, null, values, conflictAlgorithm); } Loading Loading @@ -161,6 +165,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TIMESTAMP, UpdateEntry.COLUMN_NAME_TYPE, UpdateEntry.COLUMN_NAME_VERSION, UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, UpdateEntry.COLUMN_NAME_STATUS, UpdateEntry.COLUMN_NAME_SIZE, }; Loading @@ -182,6 +187,8 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { update.setType(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_VERSION); update.setVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION); update.setDisplayVersion(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/UpdatesListAdapter.java +7 −1 Original line number Diff line number Diff line Loading @@ -249,7 +249,13 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter. String buildDate = StringGenerator.getDateLocalizedUTC(mActivity, DateFormat.LONG, update.getTimestamp()); String buildVersion = mActivity.getString(R.string.list_build_version, update.getDisplayVersion()); if (buildVersion.equals("")) { buildVersion = mActivity.getString(R.string.list_build_version, update.getVersion()); } viewHolder.mBuildDate.setText(buildDate); viewHolder.mBuildVersion.setText(buildVersion); viewHolder.mBuildVersion.setCompoundDrawables(null, null, null, null); Loading src/org/lineageos/updater/misc/BuildInfoUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -29,4 +29,8 @@ public final class BuildInfoUtils { public static String getBuildVersion() { return SystemProperties.get(Constants.PROP_BUILD_VERSION); } public static String getDisplayVersion() { return SystemProperties.get(Constants.PROP_BUILD_DISPLAY_VERSION); } } src/org/lineageos/updater/misc/Constants.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public final class Constants { public static final String PROP_AB_DEVICE = "ro.build.ab_update"; public static final String PROP_BUILD_DATE = "ro.build.date.utc"; public static final String PROP_BUILD_VERSION = "ro.lineage.build.version"; public static final String PROP_BUILD_DISPLAY_VERSION = "ro.lineage.display.version"; public static final String PROP_BUILD_VERSION_INCREMENTAL = "ro.build.version.incremental"; public static final String PROP_DEVICE = "ro.lineage.device"; public static final String PROP_NEXT_DEVICE = "ro.updater.next_device"; Loading Loading
src/org/lineageos/updater/UpdatesActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class UpdatesActivity extends UpdatesListActivity { TextView headerTitle = (TextView) findViewById(R.id.header_title); headerTitle.setText(getString(R.string.header_title_text, BuildInfoUtils.getBuildVersion())); BuildInfoUtils.getDisplayVersion())); updateLastCheckedString(); Loading
src/org/lineageos/updater/UpdatesDbHelper.java +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { public static final String COLUMN_NAME_TIMESTAMP = "timestamp"; 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_SIZE = "size"; } Loading @@ -53,6 +54,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TIMESTAMP + " INTEGER," + UpdateEntry.COLUMN_NAME_TYPE + " TEXT," + UpdateEntry.COLUMN_NAME_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_DISPLAY_VERSION + " TEXT," + UpdateEntry.COLUMN_NAME_SIZE + " INTEGER)"; private static final String SQL_DELETE_ENTRIES = Loading Loading @@ -84,6 +86,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TIMESTAMP, update.getTimestamp()); 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_SIZE, update.getFileSize()); return db.insert(UpdateEntry.TABLE_NAME, null, values); } Loading @@ -97,6 +100,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { values.put(UpdateEntry.COLUMN_NAME_TIMESTAMP, update.getTimestamp()); 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_SIZE, update.getFileSize()); return db.insertWithOnConflict(UpdateEntry.TABLE_NAME, null, values, conflictAlgorithm); } Loading Loading @@ -161,6 +165,7 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { UpdateEntry.COLUMN_NAME_TIMESTAMP, UpdateEntry.COLUMN_NAME_TYPE, UpdateEntry.COLUMN_NAME_VERSION, UpdateEntry.COLUMN_NAME_DISPLAY_VERSION, UpdateEntry.COLUMN_NAME_STATUS, UpdateEntry.COLUMN_NAME_SIZE, }; Loading @@ -182,6 +187,8 @@ public class UpdatesDbHelper extends SQLiteOpenHelper { update.setType(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_VERSION); update.setVersion(cursor.getString(index)); index = cursor.getColumnIndex(UpdateEntry.COLUMN_NAME_DISPLAY_VERSION); update.setDisplayVersion(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/UpdatesListAdapter.java +7 −1 Original line number Diff line number Diff line Loading @@ -249,7 +249,13 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter. String buildDate = StringGenerator.getDateLocalizedUTC(mActivity, DateFormat.LONG, update.getTimestamp()); String buildVersion = mActivity.getString(R.string.list_build_version, update.getDisplayVersion()); if (buildVersion.equals("")) { buildVersion = mActivity.getString(R.string.list_build_version, update.getVersion()); } viewHolder.mBuildDate.setText(buildDate); viewHolder.mBuildVersion.setText(buildVersion); viewHolder.mBuildVersion.setCompoundDrawables(null, null, null, null); Loading
src/org/lineageos/updater/misc/BuildInfoUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -29,4 +29,8 @@ public final class BuildInfoUtils { public static String getBuildVersion() { return SystemProperties.get(Constants.PROP_BUILD_VERSION); } public static String getDisplayVersion() { return SystemProperties.get(Constants.PROP_BUILD_DISPLAY_VERSION); } }
src/org/lineageos/updater/misc/Constants.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public final class Constants { public static final String PROP_AB_DEVICE = "ro.build.ab_update"; public static final String PROP_BUILD_DATE = "ro.build.date.utc"; public static final String PROP_BUILD_VERSION = "ro.lineage.build.version"; public static final String PROP_BUILD_DISPLAY_VERSION = "ro.lineage.display.version"; public static final String PROP_BUILD_VERSION_INCREMENTAL = "ro.build.version.incremental"; public static final String PROP_DEVICE = "ro.lineage.device"; public static final String PROP_NEXT_DEVICE = "ro.updater.next_device"; Loading