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
This commit is contained in:
committed by
Aayush Gupta
parent
55a4e6eb97
commit
418d464d14
@@ -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,
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user