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
4c7bdbb2
Commit
4c7bdbb2
authored
Mar 26, 2017
by
Wang Han
Committed by
topjohnwu
Mar 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crashing when selecting release notes on some devices
parent
435251ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
InstallFragment.java
app/src/main/java/com/topjohnwu/magisk/InstallFragment.java
+5
-1
Utils.java
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
+5
-3
No files found.
app/src/main/java/com/topjohnwu/magisk/InstallFragment.java
View file @
4c7bdbb2
...
@@ -100,7 +100,11 @@ public class InstallFragment extends Fragment implements CallbackEvent.Listener<
...
@@ -100,7 +100,11 @@ public class InstallFragment extends Fragment implements CallbackEvent.Listener<
magiskManager
.
magiskLink
,
magiskManager
.
magiskLink
,
Utils
.
getLegalFilename
(
filename
)))
Utils
.
getLegalFilename
(
filename
)))
.
setNeutralButton
(
R
.
string
.
release_notes
,
(
dialog
,
which
)
->
{
.
setNeutralButton
(
R
.
string
.
release_notes
,
(
dialog
,
which
)
->
{
magiskManager
.
startActivity
(
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
magiskManager
.
releaseNoteLink
)));
if
(
magiskManager
.
releaseNoteLink
!=
null
)
{
Intent
openReleaseNoteLink
=
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
magiskManager
.
releaseNoteLink
));
openReleaseNoteLink
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
magiskManager
.
startActivity
(
openReleaseNoteLink
);
}
})
})
.
setNegativeButton
(
R
.
string
.
no_thanks
,
null
)
.
setNegativeButton
(
R
.
string
.
no_thanks
,
null
)
.
show
();
.
show
();
...
...
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
View file @
4c7bdbb2
...
@@ -91,10 +91,12 @@ public class Utils {
...
@@ -91,10 +91,12 @@ public class Utils {
isDownloading
=
true
;
isDownloading
=
true
;
DownloadManager
downloadManager
=
(
DownloadManager
)
context
.
getSystemService
(
Context
.
DOWNLOAD_SERVICE
);
DownloadManager
downloadManager
=
(
DownloadManager
)
context
.
getSystemService
(
Context
.
DOWNLOAD_SERVICE
);
if
(
link
!=
null
)
{
DownloadManager
.
Request
request
=
new
DownloadManager
.
Request
(
Uri
.
parse
(
link
));
DownloadManager
.
Request
request
=
new
DownloadManager
.
Request
(
Uri
.
parse
(
link
));
request
.
setDestinationUri
(
Uri
.
fromFile
(
file
));
request
.
setDestinationUri
(
Uri
.
fromFile
(
file
));
receiver
.
setDownloadID
(
downloadManager
.
enqueue
(
request
));
receiver
.
setDownloadID
(
downloadManager
.
enqueue
(
request
));
}
receiver
.
setFilename
(
filename
);
receiver
.
setFilename
(
filename
);
context
.
registerReceiver
(
receiver
,
new
IntentFilter
(
DownloadManager
.
ACTION_DOWNLOAD_COMPLETE
));
context
.
registerReceiver
(
receiver
,
new
IntentFilter
(
DownloadManager
.
ACTION_DOWNLOAD_COMPLETE
));
}
}
...
...
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