Skip to content

Commit

Permalink
更新提示
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed May 26, 2024
1 parent 58b4eff commit 327da9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
minSdk 30
targetSdk 34
//noinspection HighAppVersionCode
versionCode 2024052603
versionCode 2024052605
versionName "3.1"

signingConfig signingConfigs.release
Expand Down
14 changes: 10 additions & 4 deletions app/src/main/java/com/hchen/foregroundpin/ui/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,26 @@ private void initMenu() {
dialog.dismiss();
return false;
})
.setOkButton("重启系统", (dialog, v) -> {
.setOkButton("重启作用域", (dialog, v) -> {
dialog.dismiss();
MessageDialog.build()
.setTitle("注意")
.setMessage("请选择你要重启的作用域")
.setOkTextInfo(new TextInfo().setFontColor(Color.RED).setFontSize(15))
.setOtherTextInfo(new TextInfo().setFontColor(Color.RED).setFontSize(15))
.setCancelTextInfo(new TextInfo().setFontSize(15))
.setOkButton("确定重启", (messageDialog, view) -> {
ShellInit.getShell().run("reboot");
.setOkButton("系统界面", (messageDialog, view) -> {
ShellInit.getShell().run("killall -15 com.android.systemui");
// ToastHelper.makeText(MainActivity.this, "按下确定");
return false;
})
.setCancelButton("取消重启", (messageDialog, view) -> {
.setCancelButton("取消", (messageDialog, view) -> {
ToastHelper.makeText(MainActivity.this, "已经取消重启");
return false;
}).setOtherButton("系统", (messageDialog, view) -> {
ShellInit.getShell().run("reboot");
// ToastHelper.makeText(MainActivity.this, "按下确定");
return false;
}).show();
return false;
})
Expand Down

0 comments on commit 327da9e

Please sign in to comment.