diff --git a/app/src/main/java/com/topjohnwu/magisk/services/TileServiceNewApi.java b/app/src/main/java/com/topjohnwu/magisk/services/TileServiceNewApi.java index f692b7649..a970fe9f1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/services/TileServiceNewApi.java +++ b/app/src/main/java/com/topjohnwu/magisk/services/TileServiceNewApi.java @@ -87,12 +87,20 @@ public class TileServiceNewApi extends android.service.quicksettings.TileService switch (rootsState) { case 2: Utils.toggleRoot(true, getApplicationContext()); + if (!Utils.hasServicePermission(getApplicationContext())) { + Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); + sendBroadcast(it); + } Utils.toggleAutoRoot(false, getApplicationContext()); break; case 1: Utils.toggleRoot(false, getApplicationContext()); break; case 0: + if (!Utils.hasServicePermission(getApplicationContext())) { + Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); + sendBroadcast(it); + } Utils.toggleAutoRoot(true, getApplicationContext()); break; } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f805253e2..61321e97e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -32,7 +32,7 @@ <string name="root_enabled_info">Root enabled. Safety Net (Android Pay) will NOT work</string> <string name="root_disabled">Root disabled</string> <string name="root_disabled_info">Safety Net (Android Pay) should work, but no root temporarily\nYou might need to manually add a card in Android Pay app to refresh the root status of AP</string> - <string name="root_auto_unmounted">Root set to auto-mount</string> + <string name="root_auto_unmounted">Root set to auto-toggle</string> <string name="root_auto_unmounted_info">Root will auto unmount for selected applications. Safety Net (Android Pay) should work.</string> <string name="root_system">Magisk Incompatible Root Detected</string> <string name="root_system_info">Root improperly installed. Safety Net (Android Pay) will NOT work, and impossible to toggle.</string>