Introduce new debug channel

This commit is contained in:
topjohnwu
2022-05-15 01:01:54 -07:00
parent 071ae79fa8
commit dc65a2b884
5 changed files with 16 additions and 8 deletions

View File

@@ -40,7 +40,9 @@ import io.michaelrocks.paranoid.Obfuscate;
public class DownloadActivity extends Activity {
private static final String APP_NAME = "Magisk";
private static final String CANARY_URL = "https://topjohnwu.github.io/magisk-files/canary.json";
private static final String JSON_URL = BuildConfig.DEBUG ?
"https://topjohnwu.github.io/magisk-files/debug.json" :
"https://topjohnwu.github.io/magisk-files/canary.json";
private String apkLink = BuildConfig.APK_URL;
private Context themed;
@@ -105,7 +107,7 @@ public class DownloadActivity extends Activity {
private void fetchCanary() {
dialog = ProgressDialog.show(themed, "", "", true);
request(CANARY_URL).getAsJSONObject(json -> {
request(JSON_URL).getAsJSONObject(json -> {
dialog.dismiss();
try {
apkLink = json.getJSONObject("magisk").getString("link");