diff --git a/app/src/main/java/com/topjohnwu/magisk/InstallFragment.java b/app/src/main/java/com/topjohnwu/magisk/InstallFragment.java index 254ea0b9a..a7d4017f7 100644 --- a/app/src/main/java/com/topjohnwu/magisk/InstallFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/InstallFragment.java @@ -98,8 +98,8 @@ public class InstallFragment extends Fragment implements CallbackEvent.Listener< } else { uninstallButton.setOnClickListener(vi -> { new AlertDialogBuilder(getActivity()) - .setTitle("Uninstall Magisk") - .setMessage("This will remove all modules, MagiskSU, and potentially re-encrypt your device\nAre you sure to process?") + .setTitle(R.string.uninstall_magisk_title) + .setMessage(R.string.uninstall_magisk_msg) .setPositiveButton(R.string.yes, (dialogInterface, i) -> { try { InputStream in = getActivity().getAssets().open(UNINSTALLER); diff --git a/app/src/main/java/com/topjohnwu/magisk/MainActivity.java b/app/src/main/java/com/topjohnwu/magisk/MainActivity.java index 2c74c0aed..04b3bff60 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MainActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/MainActivity.java @@ -78,9 +78,7 @@ public class MainActivity extends Activity drawer.addDrawerListener(toggle); toggle.syncState(); - if (savedInstanceState != null) - navigate(savedInstanceState.getInt(SECTION, R.id.status)); - else + if (savedInstanceState == null) navigate(getIntent().getStringExtra(SECTION)); navigationView.setNavigationItemSelectedListener(this); @@ -94,6 +92,12 @@ public class MainActivity extends Activity checkHideSection(); } + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + super.onRestoreInstanceState(savedInstanceState); + navigate(savedInstanceState.getInt(SECTION, R.id.status)); + } + @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); diff --git a/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java b/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java index 737c29ea5..bee007dbb 100644 --- a/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/SplashActivity.java @@ -64,7 +64,7 @@ public class SplashActivity extends Activity{ } }.exec(); new LoadApps(this).exec(); - new CheckUpdates(this, !"install".equals(getIntent().getStringExtra(MainActivity.SECTION))){ + new CheckUpdates(this, false){ @Override protected void onPostExecute(Void v) { super.onPostExecute(v); diff --git a/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java b/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java index a36aa6ebd..0762833b8 100644 --- a/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java +++ b/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java @@ -58,7 +58,7 @@ public class CheckUpdates extends ParallelTask { Intent intent = new Intent(magiskManager, SplashActivity.class); intent.putExtra(MainActivity.SECTION, "install"); TaskStackBuilder stackBuilder = TaskStackBuilder.create(magiskManager); - stackBuilder.addParentStack(MainActivity.class); + stackBuilder.addParentStack(SplashActivity.class); stackBuilder.addNextIntent(intent); PendingIntent pendingIntent = stackBuilder.getPendingIntent(NOTIFICATION_ID, PendingIntent.FLAG_UPDATE_CURRENT); builder.setContentIntent(pendingIntent); diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 0775acfc1..7fa9d652f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -42,7 +42,7 @@ 保留 dm-verity 已安裝 Magisk 版本:v%1$s 最新的 Magisk 版本:v%1$.1f - 卸載 + 解除安裝 將在 %1$d 後重啟 @@ -104,7 +104,7 @@ 你想要下載並安裝 Magisk 嗎? 正在下載 %1$s Magisk 可更新! - 勾選此項以啟用對所有 shell 命令及輸出的日誌記錄 + 重啟以完成設定 發布說明 資源庫暫存已清除 此應用使用了 SafetyNet\n已默認由 MagiskHide 處理 @@ -186,5 +186,7 @@ 處裡失敗 下載 處理中 + 解除安裝 Magisk + 這將會刪除所有模組,MagiskSU,並有可能在目前未加密的情況下加密的的資料\n你確定要繼續嗎? diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7f0fee390..76d3b0053 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -47,6 +47,8 @@ Latest Magisk Version: v%1$.1f Uninstall Rebooting in %1$d + Uninstall Magisk + This will remove all modules, MagiskSU, and potentially encrypt your data if not encrypted\nAre you sure to continue? (No info provided)