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
b2bb0d4f
Commit
b2bb0d4f
authored
Oct 13, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some external storage permission issues
parent
e140481f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
ModulesFragment.java
app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java
+7
-3
ProcessRepoZip.java
...main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java
View file @
b2bb0d4f
package
com
.
topjohnwu
.
magisk
;
import
android.Manifest
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
...
...
@@ -17,6 +18,7 @@ import com.topjohnwu.magisk.components.Fragment;
import
com.topjohnwu.magisk.container.Module
;
import
com.topjohnwu.magisk.utils.Logger
;
import
com.topjohnwu.magisk.utils.Topic
;
import
com.topjohnwu.magisk.utils.Utils
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -36,9 +38,11 @@ public class ModulesFragment extends Fragment implements Topic.Subscriber {
@BindView
(
R
.
id
.
empty_rv
)
TextView
emptyRv
;
@OnClick
(
R
.
id
.
fab
)
public
void
selectFile
()
{
Utils
.
runWithPermission
(
getActivity
(),
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
,
()
->
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
intent
.
setType
(
"application/zip"
);
startActivityForResult
(
intent
,
FETCH_ZIP_CODE
);
});
}
private
List
<
Module
>
listModules
=
new
ArrayList
<>();
...
...
app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java
View file @
b2bb0d4f
...
...
@@ -45,7 +45,6 @@ public class ProcessRepoZip extends ParallelTask<Void, Object, Boolean> {
super
(
context
);
mLink
=
link
;
mFile
=
new
File
(
Environment
.
getExternalStorageDirectory
()
+
"/MagiskManager"
,
filename
);
mFile
.
getParentFile
().
mkdirs
();
mInstall
=
install
;
}
...
...
@@ -80,6 +79,7 @@ public class ProcessRepoZip extends ParallelTask<Void, Object, Boolean> {
@Override
protected
void
onPreExecute
()
{
Activity
activity
=
getActivity
();
mFile
.
getParentFile
().
mkdirs
();
progressDialog
=
ProgressDialog
.
show
(
activity
,
activity
.
getString
(
R
.
string
.
zip_download_title
),
activity
.
getString
(
R
.
string
.
zip_download_msg
,
0
));
}
...
...
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