From 5ac6a8cb4ae330109ffbeb3ac0c4490c301ae1b8 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 20 Jul 2017 02:54:34 +0800 Subject: [PATCH] Small minor updates --- .../java/com/topjohnwu/magisk/MagiskFragment.java | 6 +++++- .../java/com/topjohnwu/magisk/SplashActivity.java | 12 +++++++----- app/src/main/res/values-zh-rTW/strings.xml | 3 +++ app/src/main/res/values/strings.xml | 2 ++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java b/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java index e1f3bbd80..d752be43b 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java @@ -372,7 +372,11 @@ public class MagiskFragment extends Fragment if (!Shell.rootAccess()) { installText.setText(R.string.download); } else { - installText.setText(R.string.download_install); + if (magiskManager.remoteMagiskVersionCode > magiskManager.magiskVersionCode) { + installText.setText(R.string.update); + } else { + installText.setText(R.string.reinstall); + } List items = new ArrayList<>(); if (magiskManager.bootBlock != null) { diff --git a/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java b/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java index 59e4aa988..c3c566fb1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java @@ -33,11 +33,8 @@ public class SplashActivity extends Activity{ magiskManager.remoteMagiskVersionString = getIntent().getStringExtra(MagiskManager.INTENT_VERSION); magiskManager.magiskLink = getIntent().getStringExtra(MagiskManager.INTENT_LINK); - // Now fire all async tasks - new LoadModules(this) - .setCallBack(() -> new LoadRepos(this).exec()) - .exec(); - new LoadApps(this).exec(); + + LoadModules loadModuleTask = new LoadModules(this); if (Utils.checkNetworkStatus(this)) { // Initialize the update check service, notify every 8 hours @@ -51,8 +48,13 @@ public class SplashActivity extends Activity{ JobScheduler scheduler = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE); scheduler.schedule(jobInfo); } + loadModuleTask.setCallBack(() -> new LoadRepos(this).exec()); } + // Now fire all async tasks + loadModuleTask.exec(); + new LoadApps(this).exec(); + Intent intent = new Intent(this, MainActivity.class); String section = getIntent().getStringExtra(MagiskManager.INTENT_SECTION); if (section != null) { diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index bb5c567e1..16d6c60e8 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -216,5 +216,8 @@ 全域 Namespace 獨立 Namespace 繼承 Namespace + 重新安裝 + 更新 + Magisk 更新 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c90d49337..7e2066934 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -55,6 +55,8 @@ Uninstall Magisk This will remove all modules, MagiskSU, and potentially encrypt your data if not encrypted\nAre you sure to continue? (None) + Re-Install + Update (No info provided)