mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 23:37:38 +00:00
Several refinements
This commit is contained in:
parent
430f2cafc1
commit
f615ed40cd
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -58,7 +58,7 @@ public class CheckUpdates extends ParallelTask<Void, Void, Void> {
|
||||
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);
|
||||
|
@ -42,7 +42,7 @@
|
||||
<string name="keep_dm_verity">保留 dm-verity</string>
|
||||
<string name="current_magisk_title">已安裝 Magisk 版本:v%1$s</string>
|
||||
<string name="install_magisk_title">最新的 Magisk 版本:v%1$.1f</string>
|
||||
<string name="uninstall">卸載</string>
|
||||
<string name="uninstall">解除安裝</string>
|
||||
<string name="reboot_countdown">將在 %1$d 後重啟</string>
|
||||
|
||||
<!--Module Fragment-->
|
||||
@ -104,7 +104,7 @@
|
||||
<string name="no_magisk_msg">你想要下載並安裝 Magisk 嗎?</string>
|
||||
<string name="downloading_toast">正在下載 %1$s</string>
|
||||
<string name="magisk_update_title">Magisk 可更新!</string>
|
||||
<string name="settings_reboot_toast">勾選此項以啟用對所有 shell 命令及輸出的日誌記錄</string>
|
||||
<string name="settings_reboot_toast">重啟以完成設定</string>
|
||||
<string name="release_notes">發布說明</string>
|
||||
<string name="repo_cache_cleared">資源庫暫存已清除</string>
|
||||
<string name="safetyNet_hide_notice">此應用使用了 SafetyNet\n已默認由 MagiskHide 處理</string>
|
||||
@ -186,5 +186,7 @@
|
||||
<string name="process_error">處裡失敗</string>
|
||||
<string name="download">下載</string>
|
||||
<string name="zip_process_title">處理中</string>
|
||||
<string name="uninstall_magisk_title">解除安裝 Magisk</string>
|
||||
<string name="uninstall_magisk_msg">這將會刪除所有模組,MagiskSU,並有可能在目前未加密的情況下加密的的資料\n你確定要繼續嗎?</string>
|
||||
|
||||
</resources>
|
||||
|
@ -47,6 +47,8 @@
|
||||
<string name="install_magisk_title">Latest Magisk Version: v%1$.1f</string>
|
||||
<string name="uninstall">Uninstall</string>
|
||||
<string name="reboot_countdown">Rebooting in %1$d</string>
|
||||
<string name="uninstall_magisk_title">Uninstall Magisk</string>
|
||||
<string name="uninstall_magisk_msg">This will remove all modules, MagiskSU, and potentially encrypt your data if not encrypted\nAre you sure to continue?</string>
|
||||
|
||||
<!--Module Fragment-->
|
||||
<string name="no_info_provided">(No info provided)</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user