File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/src/main/java/org/fedorahosted/freeotp/ui Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2121package org.fedorahosted.freeotp.ui
2222
2323import android.os.Bundle
24- import android.text.Html
2524import android.text.method.LinkMovementMethod
2625import android.widget.TextView
2726import androidx.appcompat.app.AppCompatActivity
27+ import androidx.core.content.pm.PackageInfoCompat
28+ import androidx.core.text.HtmlCompat
2829import org.fedorahosted.freeotp.R
2930
3031class AboutActivity : AppCompatActivity () {
@@ -42,14 +43,15 @@ class AboutActivity : AppCompatActivity() {
4243
4344 val pm = packageManager
4445 val info = pm.getPackageInfo(packageName, 0 )
45- val version = res.getString(R .string.about_version, info.versionName, info.versionCode)
46+ val version = res.getString(R .string.about_version,
47+ info.versionName, PackageInfoCompat .getLongVersionCode(info))
4648 aboutVersion.text = version
4749
4850 val apache2 = res.getString(R .string.link_apache2)
4951 val license = res.getString(R .string.about_license, apache2)
5052
5153 val aboutLicense: TextView = findViewById(R .id.about_license)
5254 aboutLicense.movementMethod = LinkMovementMethod .getInstance()
53- aboutLicense.text = Html .fromHtml(license)
55+ aboutLicense.text = HtmlCompat .fromHtml(license, HtmlCompat . FROM_HTML_MODE_COMPACT )
5456 }
5557}
You can’t perform that action at this time.
0 commit comments