Merges, and stuff

This commit is contained in:
d8ahazard 2016-09-17 23:30:46 -05:00
commit 2abd0265c8
3 changed files with 23 additions and 26 deletions

3
.gitignore vendored
View File

@ -2,4 +2,5 @@
.gradle .gradle
/local.properties /local.properties
.idea/ .idea/
/build /build
app/src/main/java/com/topjohnwu/magisk/RootFragment.java

View File

@ -120,10 +120,7 @@ public class ReposAdapter extends RecyclerView.Adapter<ReposAdapter.ViewHolder>
String logUrl = repo.getmLogUrl(); String logUrl = repo.getmLogUrl();
String supportUrl = repo.getmSupportUrl(); String supportUrl = repo.getmSupportUrl();
String donateUrl = repo.getmDonateUrl(); String donateUrl = repo.getmDonateUrl();
if (supportUrl.equals("")) mHolder.supportLink.setBackgroundColor(Color.GRAY); if (prefs.contains("ignoreUpdateAlerts")) {
if (logUrl.equals("")) mHolder.changeLog.setBackgroundColor(Color.GRAY);
if (donateUrl.equals("")) mHolder.authorLink.setBackgroundColor(Color.GRAY);
if (prefs.contains("ignoreUpdateAlerts")) {
ignoreAlertUpdate = prefs.getBoolean("ignoreUpdateAlerts",false); ignoreAlertUpdate = prefs.getBoolean("ignoreUpdateAlerts",false);
} }
mHolder.installedStatus.setText(repo.isInstalled() ? this.context.getResources().getString(R.string.module_installed) : this.context.getResources().getString(R.string.module_not_installed)); mHolder.installedStatus.setText(repo.isInstalled() ? this.context.getResources().getString(R.string.module_installed) : this.context.getResources().getString(R.string.module_not_installed));

View File

@ -236,28 +236,27 @@ public class RootFragment extends Fragment {
break; break;
} else { } else {
rootToggle.setEnabled(true); rootToggle.setEnabled(true);
if (new File("/system/xbin/su").exists()) { if (new File("/magisk/.core/bin/su").exists()) {
// Mounted // Mounted
rootStatusContainer.setBackgroundColor(accent); rootStatusContainer.setBackgroundColor(accent);
rootStatusIcon.setImageResource(statusError); rootStatusIcon.setImageResource(statusError);
rootStatus.setTextColor(accent); rootStatus.setTextColor(accent);
rootStatus.setText(R.string.root_mounted); rootStatus.setText(R.string.root_mounted);
rootToggle.setChecked(true); rootToggle.setChecked(true);
safetyNetStatusIcon.setImageResource(statusError); safetyNetStatusIcon.setImageResource(statusError);
safetyNetStatus.setText(R.string.root_mounted_info); safetyNetStatus.setText(R.string.root_mounted_info);
break; break;
} else { } else {
// Not Mounted // Not Mounted
rootStatusContainer.setBackgroundColor(green500); rootStatusContainer.setBackgroundColor(green500);
rootStatusIcon.setImageResource(statusOK); rootStatusIcon.setImageResource(statusOK);
rootStatus.setTextColor(green500); rootStatus.setTextColor(green500);
rootStatus.setText(R.string.root_unmounted); rootStatus.setText(R.string.root_unmounted);
rootToggle.setChecked(false); rootToggle.setChecked(false);
safetyNetStatusIcon.setImageResource(statusOK); safetyNetStatusIcon.setImageResource(statusOK);
safetyNetStatus.setText(R.string.root_unmounted_info); safetyNetStatus.setText(R.string.root_unmounted_info);
break; break;
} }
} }
case 2: case 2:
// Improper root // Improper root