mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fix
This commit is contained in:
parent
c433df0f29
commit
30ff7d988f
1 changed files with 23 additions and 23 deletions
|
@ -357,31 +357,31 @@ class InAppUpdater {
|
|||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
fun isMiUi(): Boolean {
|
||||
return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.name"))
|
||||
}
|
||||
fun isMiUi(): Boolean {
|
||||
return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.name"))
|
||||
}
|
||||
|
||||
fun getSystemProperty(propName: String): String? {
|
||||
var line: String? = null
|
||||
var input: BufferedReader? = null
|
||||
try {
|
||||
val p = Runtime.getRuntime().exec("getprop $propName")
|
||||
input = BufferedReader(InputStreamReader(p.inputStream), 1024)
|
||||
line = input.readLine()
|
||||
input.close()
|
||||
} catch (ex: IOException) {
|
||||
return null
|
||||
} finally {
|
||||
if (input != null) {
|
||||
try {
|
||||
input.close()
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
fun getSystemProperty(propName: String): String? {
|
||||
var line: String? = null
|
||||
var input: BufferedReader? = null
|
||||
try {
|
||||
val p = Runtime.getRuntime().exec("getprop $propName")
|
||||
input = BufferedReader(InputStreamReader(p.inputStream), 1024)
|
||||
line = input.readLine()
|
||||
input.close()
|
||||
} catch (ex: IOException) {
|
||||
return null
|
||||
} finally {
|
||||
if (input != null) {
|
||||
try {
|
||||
input.close()
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
return line
|
||||
}
|
||||
return line
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue