mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 13:35:27 +00:00
Minor fixes
This commit is contained in:
parent
89932b325d
commit
859a984ec8
@ -51,16 +51,11 @@ public class ReposFragment extends Fragment {
|
||||
View view = inflater.inflate(R.layout.repos_fragment, container, false);
|
||||
mView = view;
|
||||
ButterKnife.bind(this, view);
|
||||
// prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
// if (prefs.contains("ignoreUpdateAlerts")) {
|
||||
// ignoreAlertUpdate = prefs.getBoolean("ignoreUpdateAlerts", false);
|
||||
// }
|
||||
// swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
// this.LoadRepo(true);
|
||||
// ignoreAlertUpdate = false;
|
||||
// prefs.edit().putBoolean("ignoreUpdateAlerts",false).apply();
|
||||
//
|
||||
// });
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
this.LoadRepo(true);
|
||||
ignoreAlertUpdate = false;
|
||||
|
||||
});
|
||||
LoadRepo(false);
|
||||
setHasOptionsMenu(false);
|
||||
alertUpdate = false;
|
||||
@ -76,13 +71,6 @@ public class ReposFragment extends Fragment {
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
NotifyOfAlerts();
|
||||
|
||||
}
|
||||
|
||||
private void CheckForUpdates() {
|
||||
for (int i = 0; i < mListRepos.size(); i++) {
|
||||
if (mListRepos.get(i).canUpdate()) {
|
||||
@ -178,7 +166,7 @@ public class ReposFragment extends Fragment {
|
||||
if (swipeRefreshLayout.isRefreshing()) {
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
CheckForUpdates();
|
||||
NotifyOfAlerts();
|
||||
//NotifyOfAlerts();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ public class SplashActivity extends AppCompatActivity {
|
||||
if (!Utils.hasServicePermission(getApplicationContext())) {
|
||||
Utils.toggleAutoRoot(false, getApplicationContext());
|
||||
}
|
||||
}
|
||||
if (Utils.autoToggleEnabled(getApplicationContext())) {
|
||||
if (!Utils.isMyServiceRunning(MonitorService.class, getApplicationContext())) {
|
||||
Intent myIntent = new Intent(getApplication(), MonitorService.class);
|
||||
getApplication().startService(myIntent);
|
||||
@ -59,9 +61,7 @@ public class SplashActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
// Set up quick settings tile
|
||||
if (defaultPrefs.getBoolean("enable_quicktile", false)) {
|
||||
Utils.SetupQuickSettingsTile(getApplicationContext());
|
||||
}
|
||||
Utils.SetupQuickSettingsTile(getApplicationContext());
|
||||
|
||||
// Initialize
|
||||
Utils.init(this);
|
||||
|
@ -164,7 +164,6 @@ public class Utils {
|
||||
if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean("enable_quicktile", false)) {
|
||||
SetupQuickSettingsTile(context);
|
||||
}
|
||||
UpdateRootFragmentUI(context);
|
||||
}
|
||||
|
||||
static List<String> getModList(String path) {
|
||||
@ -373,18 +372,8 @@ public class Utils {
|
||||
context.startService(new Intent(context, TileServiceCompat.class));
|
||||
}
|
||||
|
||||
public static void UpdateRootFragmentUI(Context context) {
|
||||
|
||||
Logger.dh("Magisk", "Utils: UpdateRF called");
|
||||
Intent intent = new Intent(context, RootFragment.class);
|
||||
intent.setAction("com.magisk.UPDATE");
|
||||
context.sendBroadcast(intent);
|
||||
|
||||
}
|
||||
|
||||
// Gets an overall state for the quick settings tile
|
||||
// 0 for root disabled, 1 for root enabled (no auto), 2 for auto-root
|
||||
|
||||
public static int CheckRootsState(Context mContext) {
|
||||
if (autoToggleEnabled(mContext)) {
|
||||
return 2;
|
||||
|
Loading…
Reference in New Issue
Block a user