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
017fbf26
Commit
017fbf26
authored
Sep 18, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix small theme config issue
parent
e6afbf2e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
17 deletions
+11
-17
MainActivity.java
app/src/full/java/com/topjohnwu/magisk/MainActivity.java
+0
-5
FlavorActivity.java
.../java/com/topjohnwu/magisk/components/FlavorActivity.java
+1
-1
SettingsFragment.java
...java/com/topjohnwu/magisk/fragments/SettingsFragment.java
+2
-2
Topic.java
app/src/full/java/com/topjohnwu/magisk/utils/Topic.java
+8
-9
No files found.
app/src/full/java/com/topjohnwu/magisk/MainActivity.java
View file @
017fbf26
...
@@ -110,11 +110,6 @@ public class MainActivity extends BaseActivity
...
@@ -110,11 +110,6 @@ public class MainActivity extends BaseActivity
return
true
;
return
true
;
}
}
@Override
public
int
[]
getSubscribedTopics
()
{
return
new
int
[]
{
Topic
.
RELOAD_ACTIVITY
};
}
@Override
@Override
public
void
onPublish
(
int
topic
,
Object
[]
result
)
{
public
void
onPublish
(
int
topic
,
Object
[]
result
)
{
recreate
();
recreate
();
...
...
app/src/full/java/com/topjohnwu/magisk/components/FlavorActivity.java
View file @
017fbf26
...
@@ -43,11 +43,11 @@ public abstract class FlavorActivity extends AppCompatActivity implements Topic.
...
@@ -43,11 +43,11 @@ public abstract class FlavorActivity extends AppCompatActivity implements Topic.
@Override
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
Topic
.
subscribe
(
this
);
Topic
.
subscribe
(
this
);
if
(
Data
.
isDarkTheme
&&
getDarkTheme
()
!=
-
1
)
{
if
(
Data
.
isDarkTheme
&&
getDarkTheme
()
!=
-
1
)
{
setTheme
(
getDarkTheme
());
setTheme
(
getDarkTheme
());
}
}
super
.
onCreate
(
savedInstanceState
);
}
}
@Override
@Override
...
...
app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java
View file @
017fbf26
...
@@ -222,7 +222,7 @@ public class SettingsFragment extends PreferenceFragmentCompat
...
@@ -222,7 +222,7 @@ public class SettingsFragment extends PreferenceFragmentCompat
setSummary
();
setSummary
();
switch
(
key
)
{
switch
(
key
)
{
case
Const
.
Key
.
DARK_THEME
:
case
Const
.
Key
.
DARK_THEME
:
Topic
.
publish
(
false
,
Topic
.
RELOAD_ACTIVITY
);
requireActivity
().
recreate
(
);
break
;
break
;
case
Const
.
Key
.
COREONLY
:
case
Const
.
Key
.
COREONLY
:
if
(
prefs
.
getBoolean
(
key
,
false
))
{
if
(
prefs
.
getBoolean
(
key
,
false
))
{
...
@@ -254,7 +254,7 @@ public class SettingsFragment extends PreferenceFragmentCompat
...
@@ -254,7 +254,7 @@ public class SettingsFragment extends PreferenceFragmentCompat
break
;
break
;
case
Const
.
Key
.
LOCALE
:
case
Const
.
Key
.
LOCALE
:
LocaleManager
.
setLocale
(
mm
);
LocaleManager
.
setLocale
(
mm
);
Topic
.
publish
(
false
,
Topic
.
RELOAD_ACTIVITY
);
requireActivity
().
recreate
(
);
break
;
break
;
case
Const
.
Key
.
UPDATE_CHANNEL
:
case
Const
.
Key
.
UPDATE_CHANNEL
:
case
Const
.
Key
.
CUSTOM_CHANNEL
:
case
Const
.
Key
.
CUSTOM_CHANNEL
:
...
...
app/src/full/java/com/topjohnwu/magisk/utils/Topic.java
View file @
017fbf26
...
@@ -12,20 +12,19 @@ import androidx.annotation.IntDef;
...
@@ -12,20 +12,19 @@ import androidx.annotation.IntDef;
public
class
Topic
{
public
class
Topic
{
public
static
final
int
MAGISK_HIDE_DONE
=
0
;
public
static
final
int
MAGISK_HIDE_DONE
=
0
;
public
static
final
int
RELOAD_ACTIVITY
=
1
;
public
static
final
int
MODULE_LOAD_DONE
=
1
;
public
static
final
int
MODULE_LOAD_DONE
=
2
;
public
static
final
int
REPO_LOAD_DONE
=
2
;
public
static
final
int
REPO_LOAD_DONE
=
3
;
public
static
final
int
UPDATE_CHECK_DONE
=
3
;
public
static
final
int
UPDATE_CHECK_DONE
=
4
;
public
static
final
int
SNET_CHECK_DONE
=
4
;
public
static
final
int
SNET_CHECK_DONE
=
5
;
public
static
final
int
LOCALE_FETCH_DONE
=
5
;
public
static
final
int
LOCALE_FETCH_DONE
=
6
;
@IntDef
({
MAGISK_HIDE_DONE
,
MODULE_LOAD_DONE
,
REPO_LOAD_DONE
,
@IntDef
({
MAGISK_HIDE_DONE
,
RELOAD_ACTIVITY
,
MODULE_LOAD_DONE
,
REPO_LOAD_DONE
,
UPDATE_CHECK_DONE
,
SNET_CHECK_DONE
,
LOCALE_FETCH_DONE
})
UPDATE_CHECK_DONE
,
SNET_CHECK_DONE
,
LOCALE_FETCH_DONE
})
@Retention
(
RetentionPolicy
.
SOURCE
)
@Retention
(
RetentionPolicy
.
SOURCE
)
public
@interface
TopicID
{}
public
@interface
TopicID
{}
// We will not dynamically add topics, so use arrays instead of hash tables
// We will not dynamically add topics, so use arrays instead of hash tables
private
static
Store
[]
topicList
=
new
Store
[
7
];
private
static
Store
[]
topicList
=
new
Store
[
6
];
public
static
void
subscribe
(
Subscriber
sub
,
@TopicID
int
...
topics
)
{
public
static
void
subscribe
(
Subscriber
sub
,
@TopicID
int
...
topics
)
{
for
(
int
topic
:
topics
)
{
for
(
int
topic
:
topics
)
{
...
...
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