Commit 2abd0265 authored by d8ahazard's avatar d8ahazard

Merges, and stuff

parents 5898534c f96865c2
......@@ -2,4 +2,5 @@
.gradle
/local.properties
.idea/
/build
\ No newline at end of file
/build
app/src/main/java/com/topjohnwu/magisk/RootFragment.java
\ No newline at end of file
......@@ -120,10 +120,7 @@ public class ReposAdapter extends RecyclerView.Adapter<ReposAdapter.ViewHolder>
String logUrl = repo.getmLogUrl();
String supportUrl = repo.getmSupportUrl();
String donateUrl = repo.getmDonateUrl();
if (supportUrl.equals("")) mHolder.supportLink.setBackgroundColor(Color.GRAY);
if (logUrl.equals("")) mHolder.changeLog.setBackgroundColor(Color.GRAY);
if (donateUrl.equals("")) mHolder.authorLink.setBackgroundColor(Color.GRAY);
if (prefs.contains("ignoreUpdateAlerts")) {
if (prefs.contains("ignoreUpdateAlerts")) {
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));
......
......@@ -236,28 +236,27 @@ public class RootFragment extends Fragment {
break;
} else {
rootToggle.setEnabled(true);
if (new File("/system/xbin/su").exists()) {
// Mounted
rootStatusContainer.setBackgroundColor(accent);
rootStatusIcon.setImageResource(statusError);
rootStatus.setTextColor(accent);
rootStatus.setText(R.string.root_mounted);
rootToggle.setChecked(true);
safetyNetStatusIcon.setImageResource(statusError);
safetyNetStatus.setText(R.string.root_mounted_info);
break;
} else {
// Not Mounted
rootStatusContainer.setBackgroundColor(green500);
rootStatusIcon.setImageResource(statusOK);
rootStatus.setTextColor(green500);
rootStatus.setText(R.string.root_unmounted);
rootToggle.setChecked(false);
safetyNetStatusIcon.setImageResource(statusOK);
safetyNetStatus.setText(R.string.root_unmounted_info);
break;
if (new File("/magisk/.core/bin/su").exists()) {
// Mounted
rootStatusContainer.setBackgroundColor(accent);
rootStatusIcon.setImageResource(statusError);
rootStatus.setTextColor(accent);
rootStatus.setText(R.string.root_mounted);
rootToggle.setChecked(true);
safetyNetStatusIcon.setImageResource(statusError);
safetyNetStatus.setText(R.string.root_mounted_info);
break;
} else {
// Not Mounted
rootStatusContainer.setBackgroundColor(green500);
rootStatusIcon.setImageResource(statusOK);
rootStatus.setTextColor(green500);
rootStatus.setText(R.string.root_unmounted);
rootToggle.setChecked(false);
safetyNetStatusIcon.setImageResource(statusOK);
safetyNetStatus.setText(R.string.root_unmounted_info);
break;
}
}
case 2:
// Improper root
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment