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
7fc7809c
Commit
7fc7809c
authored
Oct 24, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More precise channel targeting
parent
c30be20e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
Config.kt
app/src/main/java/com/topjohnwu/magisk/Config.kt
+6
-1
DownloadActivity.java
.../src/main/java/com/topjohnwu/magisk/DownloadActivity.java
+4
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/Config.kt
View file @
7fc7809c
...
@@ -98,7 +98,12 @@ object Config : PreferenceModel, DBConfig {
...
@@ -98,7 +98,12 @@ object Config : PreferenceModel, DBConfig {
}
}
private
val
defaultChannel
=
private
val
defaultChannel
=
if
(
Utils
.
isCanary
)
Value
.
CANARY_DEBUG_CHANNEL
if
(
Utils
.
isCanary
)
{
if
(
BuildConfig
.
DEBUG
)
Value
.
CANARY_DEBUG_CHANNEL
else
Value
.
CANARY_CHANNEL
}
else
Value
.
DEFAULT_CHANNEL
else
Value
.
DEFAULT_CHANNEL
var
downloadPath
by
preference
(
Key
.
DOWNLOAD_PATH
,
Environment
.
DIRECTORY_DOWNLOADS
)
var
downloadPath
by
preference
(
Key
.
DOWNLOAD_PATH
,
Environment
.
DIRECTORY_DOWNLOADS
)
...
...
stub/src/main/java/com/topjohnwu/magisk/DownloadActivity.java
View file @
7fc7809c
...
@@ -21,8 +21,10 @@ import static com.topjohnwu.magisk.DelegateApplication.MANAGER_APK;
...
@@ -21,8 +21,10 @@ import static com.topjohnwu.magisk.DelegateApplication.MANAGER_APK;
public
class
DownloadActivity
extends
Activity
{
public
class
DownloadActivity
extends
Activity
{
static
final
String
TAG
=
"MMStub"
;
static
final
String
TAG
=
"MMStub"
;
private
static
final
String
URL
=
BuildConfig
.
DEV_CHANNEL
!=
null
?
BuildConfig
.
DEV_CHANNEL
:
private
static
final
String
URL
=
"https://raw.githubusercontent.com/topjohnwu/magisk_files/master/stable.json"
;
BuildConfig
.
DEV_CHANNEL
!=
null
?
BuildConfig
.
DEV_CHANNEL
:
"https://raw.githubusercontent.com/topjohnwu/magisk_files/"
+
(
BuildConfig
.
DEBUG
?
"canary/debug.json"
:
"master/stable.json"
);
private
String
apkLink
;
private
String
apkLink
;
private
ErrorHandler
err
=
(
conn
,
e
)
->
{
private
ErrorHandler
err
=
(
conn
,
e
)
->
{
...
...
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