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

Commit bfb05beb authored by Antoan Angelov's avatar Antoan Angelov Committed by Automerger Merge Worker
Browse files

Merge "Also check inactive profile targets in onHandlePackagesChanged" into...

Merge "Also check inactive profile targets in onHandlePackagesChanged" into rvc-dev am: 3258a3e1 am: b594019b am: 74806417 am: 00c58d94

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11894163

Change-Id: I1e3765370f588ab53d6579f2455df7e973c28b78
parents 051782f4 00c58d94
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1938,7 +1938,7 @@ public class ResolverActivity extends Activity implements
                ResolverListAdapter activeListAdapter =
                        mMultiProfilePagerAdapter.getActiveListAdapter();
                activeListAdapter.notifyDataSetChanged();
                if (activeListAdapter.getCount() == 0) {
                if (activeListAdapter.getCount() == 0 && !inactiveListAdapterHasItems()) {
                    // We no longer have any items...  just finish the activity.
                    finish();
                }
@@ -1948,6 +1948,13 @@ public class ResolverActivity extends Activity implements
        }
    }

    private boolean inactiveListAdapterHasItems() {
        if (!shouldShowTabs()) {
            return false;
        }
        return mMultiProfilePagerAdapter.getInactiveListAdapter().getCount() > 0;
    }

    private BroadcastReceiver createWorkProfileStateReceiver() {
        return new BroadcastReceiver() {
            @Override