Address a deprecated function
This commit is contained in:
1 parent
9ffd0971ae
commit
c68c67b192
1 file changed
+1
-1
@@ -28,7 +28,7 @@ class VersionPreference @JvmOverloads constructor(
|
||||
) : MessagePreference(context, attrs) {
|
||||
init {
|
||||
setTitle(R.string.settings_about_version)
|
||||
val version: String = try {
|
||||
@Suppress("DEPRECATION") val version: String = try {
|
||||
val pInfo = context.packageManager.getPackageInfo(context.packageName, 0)
|
||||
pInfo.versionName
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
|
||||
Reference in new issue
Block a user