Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
16de4674
Commit
16de4674
authored
Sep 13, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move denylist fragment to settings
parent
65b0ea79
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
20 deletions
+21
-20
MainActivity.kt
app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt
+0
-2
SettingsItems.kt
...in/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt
+7
-1
SettingsViewModel.kt
...ava/com/topjohnwu/magisk/ui/settings/SettingsViewModel.kt
+2
-1
fragment_deny_md2.xml
app/src/main/res/layout/fragment_deny_md2.xml
+1
-1
menu_bottom_nav.xml
app/src/main/res/menu/menu_bottom_nav.xml
+0
-6
main.xml
app/src/main/res/navigation/main.xml
+8
-9
strings.xml
app/src/main/res/values/strings.xml
+3
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt
View file @
16de4674
...
@@ -60,7 +60,6 @@ open class MainActivity : BaseUIActivity<MainViewModel, ActivityMainMd2Binding>(
...
@@ -60,7 +60,6 @@ open class MainActivity : BaseUIActivity<MainViewModel, ActivityMainMd2Binding>(
R
.
id
.
homeFragment
,
R
.
id
.
homeFragment
,
R
.
id
.
modulesFragment
,
R
.
id
.
modulesFragment
,
R
.
id
.
superuserFragment
,
R
.
id
.
superuserFragment
,
R
.
id
.
denyFragment
,
R
.
id
.
logFragment
->
true
R
.
id
.
logFragment
->
true
else
->
false
else
->
false
}
}
...
@@ -182,7 +181,6 @@ open class MainActivity : BaseUIActivity<MainViewModel, ActivityMainMd2Binding>(
...
@@ -182,7 +181,6 @@ open class MainActivity : BaseUIActivity<MainViewModel, ActivityMainMd2Binding>(
R
.
id
.
modulesFragment
->
MainDirections
.
actionModuleFragment
()
R
.
id
.
modulesFragment
->
MainDirections
.
actionModuleFragment
()
R
.
id
.
superuserFragment
->
MainDirections
.
actionSuperuserFragment
()
R
.
id
.
superuserFragment
->
MainDirections
.
actionSuperuserFragment
()
R
.
id
.
logFragment
->
MainDirections
.
actionLogFragment
()
R
.
id
.
logFragment
->
MainDirections
.
actionLogFragment
()
R
.
id
.
denyFragment
->
MainDirections
.
actionDenylistFragment
()
else
->
null
else
->
null
}
}
}
}
...
...
app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt
View file @
16de4674
...
@@ -253,7 +253,7 @@ object Magisk : BaseSettingsItem.Section() {
...
@@ -253,7 +253,7 @@ object Magisk : BaseSettingsItem.Section() {
}
}
object
DenyList
:
BaseSettingsItem
.
Toggle
()
{
object
DenyList
:
BaseSettingsItem
.
Toggle
()
{
override
val
title
=
R
.
string
.
denylist
.
asText
()
override
val
title
=
R
.
string
.
settings_denylist_title
.
asText
()
override
val
description
=
R
.
string
.
settings_denylist_summary
.
asText
()
override
val
description
=
R
.
string
.
settings_denylist_summary
.
asText
()
override
var
value
=
Info
.
env
.
denyListEnforced
override
var
value
=
Info
.
env
.
denyListEnforced
set
(
value
)
=
setV
(
value
,
field
,
{
field
=
it
})
{
set
(
value
)
=
setV
(
value
,
field
,
{
field
=
it
})
{
...
@@ -262,9 +262,15 @@ object DenyList : BaseSettingsItem.Toggle() {
...
@@ -262,9 +262,15 @@ object DenyList : BaseSettingsItem.Toggle() {
if
(
cb
.
isSuccess
)
Info
.
env
.
denyListEnforced
=
it
if
(
cb
.
isSuccess
)
Info
.
env
.
denyListEnforced
=
it
else
field
=
!
it
else
field
=
!
it
}
}
DenyListConfig
.
isEnabled
=
it
}
}
}
}
object
DenyListConfig
:
BaseSettingsItem
.
Blank
()
{
override
val
title
=
R
.
string
.
settings_denylist_config_title
.
asText
()
override
val
description
=
R
.
string
.
settings_denylist_config_summary
.
asText
()
}
// --- Superuser
// --- Superuser
object
Superuser
:
BaseSettingsItem
.
Section
()
{
object
Superuser
:
BaseSettingsItem
.
Section
()
{
...
...
app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsViewModel.kt
View file @
16de4674
...
@@ -73,7 +73,7 @@ class SettingsViewModel(
...
@@ -73,7 +73,7 @@ class SettingsViewModel(
SystemlessHosts
SystemlessHosts
))
))
if
(
Const
.
Version
.
isCanary
())
{
if
(
Const
.
Version
.
isCanary
())
{
list
.
add
(
DenyList
)
list
.
add
All
(
listOf
(
DenyList
,
DenyListConfig
)
)
}
}
}
}
...
@@ -105,6 +105,7 @@ class SettingsViewModel(
...
@@ -105,6 +105,7 @@ class SettingsViewModel(
is
DownloadPath
->
withExternalRW
(
callback
)
is
DownloadPath
->
withExternalRW
(
callback
)
is
Biometrics
->
authenticate
(
callback
)
is
Biometrics
->
authenticate
(
callback
)
is
Theme
->
SettingsFragmentDirections
.
actionSettingsFragmentToThemeFragment
().
navigate
()
is
Theme
->
SettingsFragmentDirections
.
actionSettingsFragmentToThemeFragment
().
navigate
()
is
DenyListConfig
->
SettingsFragmentDirections
.
actionSettingsFragmentToDenyFragment
().
navigate
()
is
ClearRepoCache
->
clearRepoCache
()
is
ClearRepoCache
->
clearRepoCache
()
is
SystemlessHosts
->
createHosts
()
is
SystemlessHosts
->
createHosts
()
is
Restore
->
HideAPK
.
restore
(
view
.
activity
)
is
Restore
->
HideAPK
.
restore
(
view
.
activity
)
...
...
app/src/main/res/layout/fragment_deny_md2.xml
View file @
16de4674
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
android:layout_gravity=
"bottom|end"
android:layout_gravity=
"bottom|end"
android:layout_marginStart=
"@dimen/l1"
android:layout_marginStart=
"@dimen/l1"
android:layout_marginEnd=
"@dimen/l1"
android:layout_marginEnd=
"@dimen/l1"
android:layout_marginBottom=
"
72dp
"
android:layout_marginBottom=
"
@dimen/l1
"
app:backgroundTint=
"?colorSurfaceSurfaceVariant"
app:backgroundTint=
"?colorSurfaceSurfaceVariant"
app:layout_fitsSystemWindowsInsets=
"bottom"
app:layout_fitsSystemWindowsInsets=
"bottom"
app:srcCompat=
"@drawable/ic_search_md2"
app:srcCompat=
"@drawable/ic_search_md2"
...
...
app/src/main/res/menu/menu_bottom_nav.xml
View file @
16de4674
...
@@ -14,12 +14,6 @@
...
@@ -14,12 +14,6 @@
android:title=
"@string/superuser"
android:title=
"@string/superuser"
tools:showAsAction=
"always"
/>
tools:showAsAction=
"always"
/>
<item
android:id=
"@+id/denyFragment"
android:icon=
"@drawable/ic_hide_md2"
android:title=
"@string/denylist"
tools:showAsAction=
"always"
/>
<item
<item
android:id=
"@+id/logFragment"
android:id=
"@+id/logFragment"
android:icon=
"@drawable/ic_bug_md2"
android:icon=
"@drawable/ic_bug_md2"
...
...
app/src/main/res/navigation/main.xml
View file @
16de4674
...
@@ -104,6 +104,14 @@
...
@@ -104,6 +104,14 @@
app:popEnterAnim=
"@anim/fragment_enter_pop"
app:popEnterAnim=
"@anim/fragment_enter_pop"
app:popExitAnim=
"@anim/fragment_exit_pop"
/>
app:popExitAnim=
"@anim/fragment_exit_pop"
/>
<action
android:id=
"@+id/action_settingsFragment_to_denyFragment"
app:destination=
"@id/denyFragment"
app:enterAnim=
"@anim/fragment_enter"
app:exitAnim=
"@anim/fragment_exit"
app:popEnterAnim=
"@anim/fragment_enter_pop"
app:popExitAnim=
"@anim/fragment_exit_pop"
/>
</fragment>
</fragment>
<fragment
<fragment
...
@@ -164,13 +172,4 @@
...
@@ -164,13 +172,4 @@
app:popExitAnim=
"@anim/fragment_exit_pop"
app:popExitAnim=
"@anim/fragment_exit_pop"
app:popUpTo=
"@id/homeFragment"
/>
app:popUpTo=
"@id/homeFragment"
/>
<action
android:id=
"@+id/action_denylistFragment"
app:destination=
"@id/denyFragment"
app:enterAnim=
"@anim/fragment_enter"
app:exitAnim=
"@anim/fragment_exit"
app:popEnterAnim=
"@anim/fragment_enter_pop"
app:popExitAnim=
"@anim/fragment_exit_pop"
app:popUpTo=
"@id/homeFragment"
/>
</navigation>
</navigation>
app/src/main/res/values/strings.xml
View file @
16de4674
...
@@ -147,7 +147,10 @@
...
@@ -147,7 +147,10 @@
<string
name=
"settings_update_beta"
>
Beta
</string>
<string
name=
"settings_update_beta"
>
Beta
</string>
<string
name=
"settings_update_custom"
>
Custom Channel
</string>
<string
name=
"settings_update_custom"
>
Custom Channel
</string>
<string
name=
"settings_update_custom_msg"
>
Insert a custom URL
</string>
<string
name=
"settings_update_custom_msg"
>
Insert a custom URL
</string>
<string
name=
"settings_denylist_title"
>
Enforce DenyList
</string>
<string
name=
"settings_denylist_summary"
>
Processes on the denylist will have all Magisk modifications reverted
</string>
<string
name=
"settings_denylist_summary"
>
Processes on the denylist will have all Magisk modifications reverted
</string>
<string
name=
"settings_denylist_config_title"
>
Configure DenyList
</string>
<string
name=
"settings_denylist_config_summary"
>
Select the processes to be included on the denylist
</string>
<string
name=
"settings_hosts_title"
>
Systemless hosts
</string>
<string
name=
"settings_hosts_title"
>
Systemless hosts
</string>
<string
name=
"settings_hosts_summary"
>
Systemless hosts support for Adblock apps
</string>
<string
name=
"settings_hosts_summary"
>
Systemless hosts support for Adblock apps
</string>
<string
name=
"settings_hosts_toast"
>
Added systemless hosts module
</string>
<string
name=
"settings_hosts_toast"
>
Added systemless hosts module
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment