Apparently, I thought a theme was a good idea...

This commit is contained in:
d8ahazard
2016-09-25 00:16:28 -05:00
parent d2335485f2
commit c56dd4172e
26 changed files with 612 additions and 424 deletions
@@ -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() {