Add intent flag for permission request from Utils

This commit is contained in:
d8ahazard 2016-09-24 10:56:57 -05:00
parent d8a4eaf026
commit 3c3bb70b01

View File

@ -149,6 +149,7 @@ public class Utils {
if (!Utils.hasServicePermission(context)) {
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();
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
} else {
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean("autoRootEnable", b).apply();