Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
android_packages_apps_Updater
Commits
173fa739
Commit
173fa739
authored
May 05, 2022
by
Rohit
Browse files
Updater: Adapt displayVersion to show proper versioning
parent
97cb9227
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/org/lineageos/updater/UpdatesListAdapter.java
View file @
173fa739
...
...
@@ -269,7 +269,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
.
getVersion
());
update
.
get
Display
Version
());
if
(!
update
.
getAndroidVersion
().
equals
(
Build
.
VERSION
.
RELEASE
)){
viewHolder
.
mUpgradeType
.
setVisibility
(
TextView
.
VISIBLE
);
...
...
@@ -472,7 +472,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
,
update
.
getVersion
(),
buildDate
);
update
.
get
Display
Version
(),
buildDate
);
if
(
update
.
getAndroidVersion
().
equals
(
Build
.
VERSION
.
RELEASE
)){
title
=
R
.
string
.
apply_update_dialog_title
;
...
...
src/org/lineageos/updater/misc/Utils.java
View file @
173fa739
...
...
@@ -97,7 +97,11 @@ public class Utils {
update
.
setFileSize
(
object
.
getLong
(
"size"
));
update
.
setDownloadUrl
(
object
.
getString
(
"url"
));
update
.
setVersion
(
object
.
getString
(
"version"
));
update
.
setDisplayVersion
(
object
.
getString
(
"display_version"
));
if
(
object
.
has
(
"pre_version"
)
&&
!
object
.
getString
(
"pre_version"
).
isEmpty
()){
update
.
setDisplayVersion
(
object
.
getString
(
"version"
)
+
"-"
+
object
.
getString
(
"pre_version"
));
}
else
{
update
.
setDisplayVersion
(
object
.
getString
(
"version"
));
}
update
.
setAndroidVersion
(
object
.
getString
(
"android_version"
));
return
update
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment