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
3e3f3850
Commit
3e3f3850
authored
Aug 07, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only use required memory size
parent
5109b9ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
InstallMagisk.java
.../full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java
+2
-2
No files found.
app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java
View file @
3e3f3850
...
@@ -147,7 +147,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
...
@@ -147,7 +147,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
console
.
add
(
"- Downloading zip"
);
console
.
add
(
"- Downloading zip"
);
HttpURLConnection
conn
=
WebService
.
mustRequest
(
Data
.
magiskLink
,
null
);
HttpURLConnection
conn
=
WebService
.
mustRequest
(
Data
.
magiskLink
,
null
);
buf
=
new
BufferedInputStream
(
new
ProgressStream
(
conn
),
conn
.
getContentLength
());
buf
=
new
BufferedInputStream
(
new
ProgressStream
(
conn
),
conn
.
getContentLength
());
buf
.
mark
(
Integer
.
MAX_VALUE
);
buf
.
mark
(
conn
.
getContentLength
()
);
try
(
OutputStream
out
=
new
FileOutputStream
(
zip
))
{
try
(
OutputStream
out
=
new
FileOutputStream
(
zip
))
{
ShellUtils
.
pump
(
buf
,
out
);
ShellUtils
.
pump
(
buf
,
out
);
}
}
...
@@ -156,7 +156,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
...
@@ -156,7 +156,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
}
else
{
}
else
{
console
.
add
(
"- Existing zip found"
);
console
.
add
(
"- Existing zip found"
);
buf
=
new
BufferedInputStream
(
new
FileInputStream
(
zip
),
(
int
)
zip
.
length
());
buf
=
new
BufferedInputStream
(
new
FileInputStream
(
zip
),
(
int
)
zip
.
length
());
buf
.
mark
(
Integer
.
MAX_VALUE
);
buf
.
mark
(
(
int
)
zip
.
length
()
);
}
}
console
.
add
(
"- Extracting files"
);
console
.
add
(
"- Extracting files"
);
...
...
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