Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab72687b authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Don't start the loader task if one is already running

This should appease the monkeys.

Bug: 9619255
Change-Id: Idbac0bd86acafbdb636b0b18e09fcbb9eea15cc4
parent f64e3b7b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen

    private List<SelectableAppInfo> mVisibleApps;
    private List<ApplicationInfo> mUserApps;
    private AsyncTask mAppLoadingTask;

    private BroadcastReceiver mUserBackgrounding = new BroadcastReceiver() {
        @Override
@@ -271,7 +272,9 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
        getActivity().registerReceiver(mUserBackgrounding,
                new IntentFilter(Intent.ACTION_USER_BACKGROUND));
        mAppListChanged = false;
        new AppLoadingTask().execute((Void[]) null);
        if (mAppLoadingTask == null || mAppLoadingTask.getStatus() == AsyncTask.Status.FINISHED) {
            mAppLoadingTask = new AppLoadingTask().execute((Void[]) null);
        }
    }

    public void onPause() {