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

Commit 8d9ca013 authored by Daniel Lehmann's avatar Daniel Lehmann
Browse files

Fix monkey crash when tab==1 is requested in search mode

Bug:6138459
Change-Id: I7c76e70d20bd483d3599d9e28f81e5ef7477477d
parent 0ddf2fac
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -854,9 +854,13 @@ public class PeopleActivity extends ContactsActivity

        private Fragment getFragment(int position) {
            if (mTabPagerAdapterSearchMode) {
                if (position == 0) {
                    return mAllFragment;
                if (position != 0) {
                    // This has only been observed in monkey tests.
                    // Let's log this issue, but not crash
                    Log.w(TAG, "Request fragment at position=" + position + ", eventhough we " +
                            "are in search mode");
                }
                return mAllFragment;
            } else {
                if (position == TabState.FAVORITES) {
                    return mFavoritesFragment;