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
859a984e
Commit
859a984e
authored
Sep 25, 2016
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes
parent
89932b32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
32 deletions
+9
-32
ReposFragment.java
app/src/main/java/com/topjohnwu/magisk/ReposFragment.java
+6
-18
SplashActivity.java
app/src/main/java/com/topjohnwu/magisk/SplashActivity.java
+3
-3
Utils.java
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
+0
-11
No files found.
app/src/main/java/com/topjohnwu/magisk/ReposFragment.java
View file @
859a984e
...
@@ -51,16 +51,11 @@ public class ReposFragment extends Fragment {
...
@@ -51,16 +51,11 @@ public class ReposFragment extends Fragment {
View
view
=
inflater
.
inflate
(
R
.
layout
.
repos_fragment
,
container
,
false
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
repos_fragment
,
container
,
false
);
mView
=
view
;
mView
=
view
;
ButterKnife
.
bind
(
this
,
view
);
ButterKnife
.
bind
(
this
,
view
);
// prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
swipeRefreshLayout
.
setOnRefreshListener
(()
->
{
// if (prefs.contains("ignoreUpdateAlerts")) {
this
.
LoadRepo
(
true
);
// ignoreAlertUpdate = prefs.getBoolean("ignoreUpdateAlerts", false);
ignoreAlertUpdate
=
false
;
// }
// swipeRefreshLayout.setOnRefreshListener(() -> {
});
// this.LoadRepo(true);
// ignoreAlertUpdate = false;
// prefs.edit().putBoolean("ignoreUpdateAlerts",false).apply();
//
// });
LoadRepo
(
false
);
LoadRepo
(
false
);
setHasOptionsMenu
(
false
);
setHasOptionsMenu
(
false
);
alertUpdate
=
false
;
alertUpdate
=
false
;
...
@@ -76,13 +71,6 @@ public class ReposFragment extends Fragment {
...
@@ -76,13 +71,6 @@ public class ReposFragment extends Fragment {
return
view
;
return
view
;
}
}
@Override
public
void
onStart
()
{
super
.
onStart
();
NotifyOfAlerts
();
}
private
void
CheckForUpdates
()
{
private
void
CheckForUpdates
()
{
for
(
int
i
=
0
;
i
<
mListRepos
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mListRepos
.
size
();
i
++)
{
if
(
mListRepos
.
get
(
i
).
canUpdate
())
{
if
(
mListRepos
.
get
(
i
).
canUpdate
())
{
...
@@ -178,7 +166,7 @@ public class ReposFragment extends Fragment {
...
@@ -178,7 +166,7 @@ public class ReposFragment extends Fragment {
if
(
swipeRefreshLayout
.
isRefreshing
())
{
if
(
swipeRefreshLayout
.
isRefreshing
())
{
swipeRefreshLayout
.
setRefreshing
(
false
);
swipeRefreshLayout
.
setRefreshing
(
false
);
CheckForUpdates
();
CheckForUpdates
();
NotifyOfAlerts
();
//
NotifyOfAlerts();
}
}
}
}
...
...
app/src/main/java/com/topjohnwu/magisk/SplashActivity.java
View file @
859a984e
...
@@ -50,6 +50,8 @@ public class SplashActivity extends AppCompatActivity {
...
@@ -50,6 +50,8 @@ public class SplashActivity extends AppCompatActivity {
if
(!
Utils
.
hasServicePermission
(
getApplicationContext
()))
{
if
(!
Utils
.
hasServicePermission
(
getApplicationContext
()))
{
Utils
.
toggleAutoRoot
(
false
,
getApplicationContext
());
Utils
.
toggleAutoRoot
(
false
,
getApplicationContext
());
}
}
}
if
(
Utils
.
autoToggleEnabled
(
getApplicationContext
()))
{
if
(!
Utils
.
isMyServiceRunning
(
MonitorService
.
class
,
getApplicationContext
()))
{
if
(!
Utils
.
isMyServiceRunning
(
MonitorService
.
class
,
getApplicationContext
()))
{
Intent
myIntent
=
new
Intent
(
getApplication
(),
MonitorService
.
class
);
Intent
myIntent
=
new
Intent
(
getApplication
(),
MonitorService
.
class
);
getApplication
().
startService
(
myIntent
);
getApplication
().
startService
(
myIntent
);
...
@@ -59,9 +61,7 @@ public class SplashActivity extends AppCompatActivity {
...
@@ -59,9 +61,7 @@ public class SplashActivity extends AppCompatActivity {
}
}
// Set up quick settings tile
// Set up quick settings tile
if
(
defaultPrefs
.
getBoolean
(
"enable_quicktile"
,
false
))
{
Utils
.
SetupQuickSettingsTile
(
getApplicationContext
());
Utils
.
SetupQuickSettingsTile
(
getApplicationContext
());
}
// Initialize
// Initialize
Utils
.
init
(
this
);
Utils
.
init
(
this
);
...
...
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
View file @
859a984e
...
@@ -164,7 +164,6 @@ public class Utils {
...
@@ -164,7 +164,6 @@ public class Utils {
if
(
PreferenceManager
.
getDefaultSharedPreferences
(
context
).
getBoolean
(
"enable_quicktile"
,
false
))
{
if
(
PreferenceManager
.
getDefaultSharedPreferences
(
context
).
getBoolean
(
"enable_quicktile"
,
false
))
{
SetupQuickSettingsTile
(
context
);
SetupQuickSettingsTile
(
context
);
}
}
UpdateRootFragmentUI
(
context
);
}
}
static
List
<
String
>
getModList
(
String
path
)
{
static
List
<
String
>
getModList
(
String
path
)
{
...
@@ -373,18 +372,8 @@ public class Utils {
...
@@ -373,18 +372,8 @@ public class Utils {
context
.
startService
(
new
Intent
(
context
,
TileServiceCompat
.
class
));
context
.
startService
(
new
Intent
(
context
,
TileServiceCompat
.
class
));
}
}
public
static
void
UpdateRootFragmentUI
(
Context
context
)
{
Logger
.
dh
(
"Magisk"
,
"Utils: UpdateRF called"
);
Intent
intent
=
new
Intent
(
context
,
RootFragment
.
class
);
intent
.
setAction
(
"com.magisk.UPDATE"
);
context
.
sendBroadcast
(
intent
);
}
// Gets an overall state for the quick settings tile
// Gets an overall state for the quick settings tile
// 0 for root disabled, 1 for root enabled (no auto), 2 for auto-root
// 0 for root disabled, 1 for root enabled (no auto), 2 for auto-root
public
static
int
CheckRootsState
(
Context
mContext
)
{
public
static
int
CheckRootsState
(
Context
mContext
)
{
if
(
autoToggleEnabled
(
mContext
))
{
if
(
autoToggleEnabled
(
mContext
))
{
return
2
;
return
2
;
...
...
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