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
7a4a5c89
Commit
7a4a5c89
authored
Aug 23, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure JobService is rescheduled
parent
928a16d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
Config.kt
app/src/main/java/com/topjohnwu/magisk/core/Config.kt
+10
-1
SettingsItems.kt
...in/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt
+1
-8
No files found.
app/src/main/java/com/topjohnwu/magisk/core/Config.kt
View file @
7a4a5c89
...
...
@@ -6,6 +6,7 @@ import android.util.Xml
import
androidx.appcompat.app.AppCompatDelegate
import
androidx.core.content.edit
import
com.topjohnwu.magisk.BuildConfig
import
com.topjohnwu.magisk.core.di.AppContext
import
com.topjohnwu.magisk.core.di.ServiceLocator
import
com.topjohnwu.magisk.core.repository.BoolDBPropertyNoWrite
import
com.topjohnwu.magisk.core.repository.DBConfig
...
...
@@ -136,7 +137,15 @@ object Config : PreferenceConfig, DBConfig {
var
themeOrdinal
by
preference
(
Key
.
THEME_ORDINAL
,
Theme
.
Piplup
.
ordinal
)
var
suReAuth
by
preference
(
Key
.
SU_REAUTH
,
false
)
var
suTapjack
by
preference
(
Key
.
SU_TAPJACK
,
true
)
var
checkUpdate
by
preference
(
Key
.
CHECK_UPDATES
,
true
)
private
var
checkUpdatePrefs
by
preference
(
Key
.
CHECK_UPDATES
,
true
)
var
checkUpdate
get
()
=
checkUpdatePrefs
set
(
value
)
{
if
(
checkUpdatePrefs
!=
value
)
{
checkUpdatePrefs
=
value
JobService
.
schedule
(
AppContext
)
}
}
var
doh
by
preference
(
Key
.
DOH
,
false
)
var
showSystemApp
by
preference
(
Key
.
SHOW_SYSTEM_APP
,
false
)
...
...
app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt
View file @
7a4a5c89
...
...
@@ -12,8 +12,6 @@ import com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.core.Config
import
com.topjohnwu.magisk.core.Const
import
com.topjohnwu.magisk.core.Info
import
com.topjohnwu.magisk.core.JobService
import
com.topjohnwu.magisk.core.di.AppContext
import
com.topjohnwu.magisk.core.tasks.HideAPK
import
com.topjohnwu.magisk.core.utils.BiometricHelper
import
com.topjohnwu.magisk.core.utils.MediaStoreUtils
...
...
@@ -202,12 +200,7 @@ object UpdateChannelUrl : BaseSettingsItem.Input() {
object
UpdateChecker
:
BaseSettingsItem
.
Toggle
()
{
override
val
title
=
R
.
string
.
settings_check_update_title
.
asText
()
override
val
description
=
R
.
string
.
settings_check_update_summary
.
asText
()
override
var
value
get
()
=
Config
.
checkUpdate
set
(
value
)
{
Config
.
checkUpdate
=
value
JobService
.
schedule
(
AppContext
)
}
override
var
value
by
Config
::
checkUpdate
}
object
DoHToggle
:
BaseSettingsItem
.
Toggle
()
{
...
...
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