Proper canary version detection

This commit is contained in:
topjohnwu
2020-02-17 22:05:32 -08:00
parent 8453282fa6
commit 1e7e06d1cc
5 changed files with 15 additions and 36 deletions

View File

@@ -27,7 +27,7 @@ import static com.topjohnwu.magisk.DelegateApplication.MANAGER_APK;
public class DownloadActivity extends Activity {
private static final boolean CANARY = BuildConfig.VERSION_NAME.contains("-");
private static final boolean CANARY = !BuildConfig.VERSION_NAME.contains(".");
private static final String URL =
BuildConfig.DEV_CHANNEL != null ? BuildConfig.DEV_CHANNEL : RawData.urlBase() +
(BuildConfig.DEBUG ? RawData.debug() : (CANARY ? RawData.canary() : RawData.stable()));