Commit 154cb1fe authored by Aayush Gupta's avatar Aayush Gupta
Browse files

updater: Show update's version wherever applicable



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.

At /e/, we bump version number on every new OTA. This results in version mismatch in several places
in the updater app. Let's get the version from the update itself to show the proper version.
Signed-off-by: Aayush Gupta's avatarAayush Gupta <theimpulson@e.email>
parent 27e0e40c
......@@ -266,12 +266,7 @@ 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());
}
update.getVersion());
viewHolder.mBuildDate.setText(buildDate);
viewHolder.mBuildVersion.setText(buildVersion);
......@@ -479,7 +474,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,
......
......@@ -492,7 +492,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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment