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

Commit 7ae03eb8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Be more consistent with Q when the tabs feature flag is disabled."

parents af30b28e db0c1f18
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1304,8 +1304,11 @@ public class ResolverActivity extends Activity implements
                    + "cannot be null.");
        }
        // We partially rebuild the inactive adapter to determine if we should auto launch
        boolean rebuildActiveCompleted = mMultiProfilePagerAdapter.rebuildActiveTab(true);
        boolean rebuildCompleted = mMultiProfilePagerAdapter.rebuildActiveTab(true);
        if (hasWorkProfile() && ENABLE_TABBED_VIEW) {
            boolean rebuildInactiveCompleted = mMultiProfilePagerAdapter.rebuildInactiveTab(false);
            rebuildCompleted = rebuildCompleted && rebuildInactiveCompleted;
        }

        if (useLayoutWithDefault()) {
            mLayoutId = R.layout.resolver_list_with_default;
@@ -1314,7 +1317,7 @@ public class ResolverActivity extends Activity implements
        }
        setContentView(mLayoutId);
        mMultiProfilePagerAdapter.setupViewPager(findViewById(R.id.profile_pager));
        return postRebuildList(rebuildActiveCompleted && rebuildInactiveCompleted);
        return postRebuildList(rebuildCompleted);
    }

    /**
@@ -1378,6 +1381,10 @@ public class ResolverActivity extends Activity implements
            return false;
        }

        if (mMultiProfilePagerAdapter.getActiveListAdapter().getOtherProfile() != null) {
            return false;
        }

        // Only one target, so we're a candidate to auto-launch!
        final TargetInfo target = mMultiProfilePagerAdapter.getActiveListAdapter()
                .targetInfoForPosition(0, false);