You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Apparently, I thought a theme was a good idea...
This commit is contained in:
@@ -18,7 +18,6 @@ import android.view.accessibility.AccessibilityEvent;
|
||||
import com.topjohnwu.magisk.MainActivity;
|
||||
import com.topjohnwu.magisk.R;
|
||||
import com.topjohnwu.magisk.utils.Logger;
|
||||
import com.topjohnwu.magisk.utils.PrefHelper;
|
||||
import com.topjohnwu.magisk.utils.Utils;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -109,7 +108,7 @@ public class MonitorService extends AccessibilityService {
|
||||
private void ShowNotification(boolean rootAction, String packageName) {
|
||||
NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
NotificationCompat.Builder mBuilder;
|
||||
if (!PrefHelper.CheckBool("hide_root_notification", getApplicationContext())) {
|
||||
if (!PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getBoolean("hide_root_notification", false)) {
|
||||
if (rootAction) {
|
||||
|
||||
Intent intent = new Intent(getApplication(), MainActivity.class);
|
||||
|
||||
@@ -74,15 +74,26 @@ public class TileServiceCompat extends Service {
|
||||
private void onSimpleClick() {
|
||||
updateRoots();
|
||||
updateTile();
|
||||
Utils.toggleAutoRoot(false,getApplicationContext());
|
||||
Utils.toggleRoot(!root,getApplicationContext());
|
||||
if (autoRoot) {
|
||||
|
||||
Utils.toggleAutoRoot(false, getApplicationContext());
|
||||
if (!Utils.hasServicePermission(getApplicationContext())) {
|
||||
Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
|
||||
sendBroadcast(it);
|
||||
}
|
||||
} else {
|
||||
Utils.toggleRoot(!root, getApplicationContext());
|
||||
}
|
||||
}
|
||||
|
||||
private void onLongClick() {
|
||||
updateRoots();
|
||||
updateTile();
|
||||
Utils.toggleAutoRoot(!autoRoot,getApplicationContext());
|
||||
if (!Utils.hasServicePermission(getApplicationContext())) {
|
||||
Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
|
||||
sendBroadcast(it);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateTile() {
|
||||
|
||||
Reference in New Issue
Block a user