diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt index 7836104e..8a4f145b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt @@ -357,31 +357,31 @@ class InAppUpdater { } return false } - } - - 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 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() + } } } + return line } - return line } }