mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-05 07:17:38 +00:00
Add intent flag for permission request from Utils
This commit is contained in:
parent
d8a4eaf026
commit
3c3bb70b01
@ -149,6 +149,7 @@ public class Utils {
|
|||||||
if (!Utils.hasServicePermission(context)) {
|
if (!Utils.hasServicePermission(context)) {
|
||||||
Intent intent = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
|
Intent intent = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
|
||||||
Toast.makeText(context, "Please enable Magisk in accessibility for auto-toggle work.", Toast.LENGTH_LONG).show();
|
Toast.makeText(context, "Please enable Magisk in accessibility for auto-toggle work.", Toast.LENGTH_LONG).show();
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
} else {
|
} else {
|
||||||
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean("autoRootEnable", b).apply();
|
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean("autoRootEnable", b).apply();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user