Skip to content

Commit

Permalink
revert partial kotlinize ExpandableUploadListAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 committed Nov 15, 2019
1 parent 2482002 commit 83689f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions owncloudApp/src/main/java/com/owncloud/android/MainApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,13 @@ class MainApp : MultiDexApplication() {
val accountType: String
get() = appContext!!.resources.getString(R.string.account_type)

@Suppress("DEPRECATION")
val versionCode: Long
val versionCode: Int
get() {
return try {
try {
val thisPackageName = appContext!!.packageName
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
appContext!!.packageManager.getPackageInfo(thisPackageName, 0).longVersionCode
} else {
appContext!!.packageManager.getPackageInfo(thisPackageName, 0).versionCode.toLong()
}
return appContext!!.packageManager.getPackageInfo(thisPackageName, 0).versionCode
} catch (e: PackageManager.NameNotFoundException) {
0
return 0
}

}
Expand Down

0 comments on commit 83689f3

Please sign in to comment.