reverted MIUI warning system
This commit is contained in:
parent
26bf0a90d7
commit
cb97aa2fe1
|
@ -206,10 +206,6 @@ class MainActivity : AppCompatActivity() {
|
|||
subscribeToTopic("Music-Update")
|
||||
subscribeToTopic("MicroG-Update")
|
||||
}
|
||||
} else {
|
||||
if (isMiuiOptimizationsEnabled) {
|
||||
DialogContainer.applyAccentMiuiDialog(this)
|
||||
}
|
||||
}
|
||||
|
||||
if (!prefs.getBoolean("statement", true)) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import androidx.preference.PreferenceManager
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.utils.applyAccent
|
||||
import com.vanced.manager.utils.isMiuiOptimizationsEnabled
|
||||
import com.vanced.manager.utils.isMiui
|
||||
import com.vanced.manager.utils.openUrl
|
||||
|
||||
object DialogContainer {
|
||||
|
@ -19,7 +19,7 @@ object DialogContainer {
|
|||
dialog.cancel()
|
||||
}
|
||||
setOnCancelListener {
|
||||
if (isMiuiOptimizationsEnabled) {
|
||||
if (isMiui) {
|
||||
applyAccentMiuiDialog(context)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ object AppUtils: CoroutineScope by CoroutineScope(Dispatchers.IO) {
|
|||
status.contains("Files_Missing_VA") -> context.getString(R.string.files_missing_va)
|
||||
status.contains("Path_Missing") -> context.getString(R.string.path_missing)
|
||||
status.contains("INSTALL_FAILED_INTERNAL_ERROR: Permission Denied") -> {
|
||||
if (isMiuiOptimizationsEnabled)
|
||||
if (isMiui)
|
||||
context.getString(R.string.installation_miui)
|
||||
else
|
||||
context.getString(R.string.installation_blocked)
|
||||
|
|
|
@ -2,9 +2,9 @@ package com.vanced.manager.utils
|
|||
|
||||
import com.topjohnwu.superuser.Shell
|
||||
|
||||
private const val MIUI_OPTIMIZATIONS_PROP = "persist.sys.miui_optimization"
|
||||
private const val MIUI_PROP = "ro.miui.ui.version.name"
|
||||
|
||||
val isMiuiOptimizationsEnabled get() = getSystemProperty(MIUI_OPTIMIZATIONS_PROP) == "true"
|
||||
val isMiui get() = !getSystemProperty(MIUI_PROP).isNullOrEmpty()
|
||||
|
||||
fun getSystemProperty(propname: String): String? {
|
||||
return try {
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<string name="guide">Guide</string>
|
||||
<string name="hold_on">Stop!</string>
|
||||
<string name="magisk_vanced">You are using the Magisk/TWRP version of Vanced, which is discontinued and cannot be updated using this app. Please remove it by removing the Magisk module/using TWRP Vanced uninstaller.</string>
|
||||
<string name="miui_one_title">MIUI Optimizations are enabled!</string>
|
||||
<string name="miui_one_title">MIUI Detected!</string>
|
||||
<string name="miui_one">To install Vanced, you MUST disable MIUI Optimizations in the developer settings. (You can ignore this warning if you are using 20.2.20 or later xiaomi.eu based ROM)</string>
|
||||
<string name="error">Error</string>
|
||||
<string name="redownload">Redownload</string>
|
||||
|
|
Loading…
Reference in New Issue