diff options
author | Aayush Gupta <theimpulson@e.email> | 2021-03-23 15:30:47 +0530 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-06-29 12:32:24 +0800 |
commit | d62aa86abfa996196528e58823a5760397713926 (patch) | |
tree | d0264ba71bf636287258293744a1ebe99233189e | |
parent | 7ad1a4bb2e6151f00f72be7b2e35b3c03b57e18a (diff) |
Updater: Show update's version on AlertDialog and Notification
Currently at most of the places, build version is obtained from BuildInfoUtils.getBuildVersion()
method. This method obtains build version from the current running system's property.
However, in case there is a version bump on OTA, this logic results in wrong version
being shown to the user while updating/upgrading the system.
Get the version from the update itself to show the proper version in update notification
and pre-install warning.
Signed-off-by: Aayush Gupta <theimpulson@e.email>
Change-Id: Ia74085d8d7c067c408e7cfce1de90d49dcc68307
-rw-r--r-- | src/org/lineageos/updater/UpdatesListAdapter.java | 2 | ||||
-rw-r--r-- | src/org/lineageos/updater/controller/UpdaterService.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/org/lineageos/updater/UpdatesListAdapter.java b/src/org/lineageos/updater/UpdatesListAdapter.java index c06b4e0..608ad7e 100644 --- a/src/org/lineageos/updater/UpdatesListAdapter.java +++ b/src/org/lineageos/updater/UpdatesListAdapter.java @@ -481,7 +481,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter. String buildDate = StringGenerator.getDateLocalizedUTC(mActivity, DateFormat.MEDIUM, update.getTimestamp()); String buildInfoText = mActivity.getString(R.string.list_build_version_date, - BuildInfoUtils.getBuildVersion(), buildDate); + update.getVersion(), buildDate); return new AlertDialog.Builder(mActivity) .setTitle(R.string.apply_update_dialog_title) .setMessage(mActivity.getString(resId, buildInfoText, diff --git a/src/org/lineageos/updater/controller/UpdaterService.java b/src/org/lineageos/updater/controller/UpdaterService.java index cff6ce5..cd9334b 100644 --- a/src/org/lineageos/updater/controller/UpdaterService.java +++ b/src/org/lineageos/updater/controller/UpdaterService.java @@ -491,7 +491,7 @@ public class UpdaterService extends Service { String buildDate = StringGenerator.getDateLocalizedUTC(this, DateFormat.MEDIUM, update.getTimestamp()); String buildInfo = getString(R.string.list_build_version_date, - BuildInfoUtils.getBuildVersion(), buildDate); + update.getVersion(), buildDate); mNotificationStyle.setBigContentTitle(buildInfo); mNotificationBuilder.setContentTitle(buildInfo); } |