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
1d70d0fe
Commit
1d70d0fe
authored
Feb 17, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show notification again if coming from notification
parent
ac44f058
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
MagiskManager.java
app/src/main/java/com/topjohnwu/magisk/MagiskManager.java
+0
-1
SplashActivity.java
app/src/main/java/com/topjohnwu/magisk/SplashActivity.java
+11
-9
CheckUpdates.java
...c/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java
+1
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/MagiskManager.java
View file @
1d70d0fe
...
...
@@ -47,7 +47,6 @@ public class MagiskManager extends Application {
public
boolean
isSuClient
=
false
;
public
String
suVersion
=
null
;
public
boolean
disabled
=
false
;
public
boolean
isNotified
=
false
;
// Data
public
ValueSortedMap
<
String
,
Repo
>
repoMap
;
...
...
app/src/main/java/com/topjohnwu/magisk/SplashActivity.java
View file @
1d70d0fe
...
...
@@ -39,14 +39,16 @@ public class SplashActivity extends Activity{
boolean
started
=
Utils
.
isValidShellResponse
(
ret
)
&&
Integer
.
parseInt
(
ret
.
get
(
0
))
!=
0
;
// Initialize the update check service, notify every 3 hours
ComponentName
service
=
new
ComponentName
(
magiskManager
,
UpdateCheckService
.
class
);
JobInfo
jobInfo
=
new
JobInfo
.
Builder
(
UPDATE_SERVICE_ID
,
service
)
.
setRequiredNetworkType
(
JobInfo
.
NETWORK_TYPE_ANY
)
.
setPersisted
(
true
)
.
setPeriodic
(
3
*
60
*
60
*
1000
)
.
build
();
JobScheduler
scheduler
=
(
JobScheduler
)
getSystemService
(
Context
.
JOB_SCHEDULER_SERVICE
);
scheduler
.
schedule
(
jobInfo
);
if
(!
"install"
.
equals
(
getIntent
().
getStringExtra
(
MainActivity
.
SECTION
)))
{
ComponentName
service
=
new
ComponentName
(
magiskManager
,
UpdateCheckService
.
class
);
JobInfo
jobInfo
=
new
JobInfo
.
Builder
(
UPDATE_SERVICE_ID
,
service
)
.
setRequiredNetworkType
(
JobInfo
.
NETWORK_TYPE_ANY
)
.
setPersisted
(
true
)
.
setPeriodic
(
3
*
60
*
60
*
1000
)
.
build
();
JobScheduler
scheduler
=
(
JobScheduler
)
getSystemService
(
Context
.
JOB_SCHEDULER_SERVICE
);
scheduler
.
schedule
(
jobInfo
);
}
// Now fire all async tasks
new
GetBootBlocks
(
this
).
exec
();
...
...
@@ -62,7 +64,7 @@ public class SplashActivity extends Activity{
}
}.
exec
();
new
LoadApps
(
this
).
exec
();
new
CheckUpdates
(
this
,
true
){
new
CheckUpdates
(
this
,
!
"install"
.
equals
(
getIntent
().
getStringExtra
(
MainActivity
.
SECTION
))
){
@Override
protected
void
onPostExecute
(
Void
v
)
{
super
.
onPostExecute
(
v
);
...
...
app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java
View file @
1d70d0fe
...
...
@@ -25,7 +25,7 @@ public class CheckUpdates extends ParallelTask<Void, Void, Void> {
public
CheckUpdates
(
Context
context
,
boolean
b
)
{
this
(
context
);
showNotification
=
b
&&
!
magiskManager
.
isNotified
;
showNotification
=
b
;
}
public
CheckUpdates
(
Context
context
)
{
...
...
@@ -49,7 +49,6 @@ public class CheckUpdates extends ParallelTask<Void, Void, Void> {
@Override
protected
void
onPostExecute
(
Void
v
)
{
if
(
magiskManager
.
magiskVersion
<
magiskManager
.
remoteMagiskVersion
&&
showNotification
)
{
magiskManager
.
isNotified
=
true
;
NotificationCompat
.
Builder
builder
=
new
NotificationCompat
.
Builder
(
magiskManager
);
builder
.
setSmallIcon
(
R
.
drawable
.
ic_magisk
)
.
setContentTitle
(
magiskManager
.
getString
(
R
.
string
.
magisk_update_title
))
...
...
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