Hide MagiskHide pre Kitkat
This commit is contained in:
parent
8a61ae621d
commit
8a338de696
@ -72,6 +72,10 @@ class SettingsViewModel(
|
|||||||
Magisk,
|
Magisk,
|
||||||
MagiskHide, SystemlessHosts
|
MagiskHide, SystemlessHosts
|
||||||
))
|
))
|
||||||
|
if (Build.VERSION.SDK_INT < 19) {
|
||||||
|
// MagiskHide is only available on 4.4+
|
||||||
|
list.remove(MagiskHide)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Superuser
|
// Superuser
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.topjohnwu.magisk.ui.superuser
|
package com.topjohnwu.magisk.ui.superuser
|
||||||
|
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
|
import android.os.Build
|
||||||
import androidx.databinding.ObservableArrayList
|
import androidx.databinding.ObservableArrayList
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.topjohnwu.magisk.BR
|
import com.topjohnwu.magisk.BR
|
||||||
@ -35,9 +36,10 @@ class SuperuserViewModel(
|
|||||||
private val itemsHelpers = ObservableArrayList<TextItem>()
|
private val itemsHelpers = ObservableArrayList<TextItem>()
|
||||||
|
|
||||||
val adapter = adapterOf<ComparableRvItem<*>>()
|
val adapter = adapterOf<ComparableRvItem<*>>()
|
||||||
val items = MergeObservableList<ComparableRvItem<*>>()
|
val items = MergeObservableList<ComparableRvItem<*>>().apply {
|
||||||
.insertItem(TappableHeadlineItem.Hide)
|
if (Build.VERSION.SDK_INT >= 19)
|
||||||
.insertList(itemsHelpers)
|
insertItem(TappableHeadlineItem.Hide)
|
||||||
|
}.insertList(itemsHelpers)
|
||||||
.insertList(itemsPolicies)
|
.insertList(itemsPolicies)
|
||||||
val itemBinding = itemBindingOf<ComparableRvItem<*>> {
|
val itemBinding = itemBindingOf<ComparableRvItem<*>> {
|
||||||
it.bindExtra(BR.listener, this)
|
it.bindExtra(BR.listener, this)
|
||||||
|
Loading…
Reference in New Issue
Block a user