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
df9c40c0
Commit
df9c40c0
authored
Feb 19, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to raw resources
parent
25b67017
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
19 deletions
+8
-19
.gitignore
.gitignore
+1
-1
AboutActivity.java
src/main/java/com/topjohnwu/magisk/AboutActivity.java
+2
-8
MainActivity.java
src/main/java/com/topjohnwu/magisk/MainActivity.java
+2
-9
MarkDownWindow.java
...main/java/com/topjohnwu/magisk/asyncs/MarkDownWindow.java
+3
-1
changelog.md
src/main/res/raw/changelog.md
+0
-0
dark.css
src/main/res/raw/dark.css
+0
-0
light.css
src/main/res/raw/light.css
+0
-0
No files found.
.gitignore
View file @
df9c40c0
...
...
@@ -6,7 +6,7 @@
app/release
*.hprof
.externalNativeBuild/
src/main/assets
/*.sh
src/main/assets
public.certificate.x509.pem
private.key.pk8
*.apk
src/main/java/com/topjohnwu/magisk/AboutActivity.java
View file @
df9c40c0
...
...
@@ -14,8 +14,6 @@ import com.topjohnwu.magisk.components.AboutCardRow;
import
com.topjohnwu.magisk.components.Activity
;
import
com.topjohnwu.magisk.utils.Const
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.Locale
;
import
butterknife.BindView
;
...
...
@@ -56,12 +54,8 @@ public class AboutActivity extends Activity {
appChangelog
.
removeSummary
();
appChangelog
.
setOnClickListener
(
v
->
{
try
{
InputStream
is
=
getAssets
().
open
(
"changelog.md"
);
new
MarkDownWindow
(
this
,
getString
(
R
.
string
.
app_changelog
),
is
).
exec
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
new
MarkDownWindow
(
this
,
getString
(
R
.
string
.
app_changelog
),
getResources
().
openRawResource
(
R
.
raw
.
changelog
)).
exec
();
});
String
translators
=
getString
(
R
.
string
.
translators
);
...
...
src/main/java/com/topjohnwu/magisk/MainActivity.java
View file @
df9c40c0
...
...
@@ -23,9 +23,6 @@ import com.topjohnwu.magisk.utils.Topic;
import
com.topjohnwu.magisk.utils.Utils
;
import
com.topjohnwu.superuser.Shell
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
...
...
@@ -99,12 +96,8 @@ public class MainActivity extends Activity
if
(
mm
.
prefs
.
getInt
(
Const
.
Key
.
APP_VER
,
-
1
)
<
BuildConfig
.
VERSION_CODE
)
{
prefs
.
edit
().
putInt
(
Const
.
Key
.
APP_VER
,
BuildConfig
.
VERSION_CODE
).
apply
();
try
{
InputStream
is
=
getAssets
().
open
(
"changelog.md"
);
new
MarkDownWindow
(
this
,
getString
(
R
.
string
.
app_changelog
),
is
).
exec
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
new
MarkDownWindow
(
this
,
getString
(
R
.
string
.
app_changelog
),
getResources
().
openRawResource
(
R
.
raw
.
changelog
)).
exec
();
}
}
...
...
src/main/java/com/topjohnwu/magisk/asyncs/MarkDownWindow.java
View file @
df9c40c0
...
...
@@ -54,11 +54,13 @@ public class MarkDownWindow extends ParallelTask<Void, Void, String> {
}
String
css
;
try
(
InputStream
in
=
mm
.
getAssets
().
open
(
mm
.
isDarkTheme
?
"dark.css"
:
"light.css"
);
InputStream
in
=
mm
.
getResources
().
openRawResource
(
mm
.
isDarkTheme
?
R
.
raw
.
dark
:
R
.
raw
.
light
);
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
()
)
{
ShellUtils
.
pump
(
in
,
out
);
css
=
out
.
toString
();
in
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
""
;
...
...
src/main/
assets
/changelog.md
→
src/main/
res/raw
/changelog.md
View file @
df9c40c0
File moved
src/main/
assets
/dark.css
→
src/main/
res/raw
/dark.css
View file @
df9c40c0
File moved
src/main/
assets
/light.css
→
src/main/
res/raw
/light.css
View file @
df9c40c0
File moved
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