diff --git a/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/TappableHeadlineItem.kt b/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/TappableHeadlineItem.kt index 7bd7f3238..48c394ae0 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/TappableHeadlineItem.kt +++ b/app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/TappableHeadlineItem.kt @@ -31,11 +31,6 @@ sealed class TappableHeadlineItem : ComparableRvItem() { override val icon = R.drawable.ic_hide_md2 } - object Safetynet : TappableHeadlineItem() { - override val title = R.string.safetynet - override val icon = R.drawable.ic_safetynet_md2 - } - object ThemeMode : TappableHeadlineItem() { override val title = R.string.settings_dark_mode_title override val icon = R.drawable.ic_day_night diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt index 99f5e86b5..67a787d4b 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt @@ -134,6 +134,9 @@ class HomeViewModel( HomeFragmentDirections.actionHomeFragmentToInstallFragment().publish() } + fun onSafetyNetPressed() = + HomeFragmentDirections.actionHomeFragmentToSafetynetFragment().publish() + fun hideNotice() { Config.safetyNotice = false isNoticeVisible = false diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt index 1b2b6b993..034ccd636 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt @@ -42,7 +42,6 @@ class SuperuserViewModel( val adapter = adapterOf>() val items = MergeObservableList>() .insertItem(TappableHeadlineItem.Hide) - .insertItem(TappableHeadlineItem.Safetynet) .insertList(itemsHelpers) .insertList(itemsPolicies) val itemBinding = itemBindingOf> { @@ -75,13 +74,9 @@ class SuperuserViewModel( @Suppress("REDUNDANT_ELSE_IN_WHEN") override fun onItemPressed(item: TappableHeadlineItem) = when (item) { TappableHeadlineItem.Hide -> hidePressed() - TappableHeadlineItem.Safetynet -> safetynetPressed() else -> Unit } - private fun safetynetPressed() = - SuperuserFragmentDirections.actionSuperuserFragmentToSafetynetFragment().publish() - private fun hidePressed() = SuperuserFragmentDirections.actionSuperuserFragmentToHideFragment().publish() diff --git a/app/src/main/res/layout/fragment_home_md2.xml b/app/src/main/res/layout/fragment_home_md2.xml index f69f07c2b..a0e85fff2 100644 --- a/app/src/main/res/layout/fragment_home_md2.xml +++ b/app/src/main/res/layout/fragment_home_md2.xml @@ -5,6 +5,10 @@ + + + + @@ -99,6 +103,35 @@ android:layout_marginTop="@dimen/l1" app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper" /> + + + + - - - - + tools:text="@string/magiskhide" /> - \ No newline at end of file + diff --git a/app/src/main/res/navigation/main.xml b/app/src/main/res/navigation/main.xml index f3febf07d..afa289315 100644 --- a/app/src/main/res/navigation/main.xml +++ b/app/src/main/res/navigation/main.xml @@ -33,6 +33,14 @@ app:popEnterAnim="@anim/fragment_enter_pop" app:popExitAnim="@anim/fragment_exit_pop" /> + + - - - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 16952f55f..2fcdbb1f0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -43,6 +43,7 @@ Invalid Update Channel Uninstall Magisk All modules will be disabled/removed!\nRoot will be removed!\nYour data potentially encrypted if not already! + Check SafetyNet Preserve force encryption diff --git a/app/src/main/res/values/styles_md2_impl.xml b/app/src/main/res/values/styles_md2_impl.xml index 052c37236..f44294250 100644 --- a/app/src/main/res/values/styles_md2_impl.xml +++ b/app/src/main/res/values/styles_md2_impl.xml @@ -87,6 +87,13 @@ ?colorOnPrimary + + - \ No newline at end of file +