Fix the double query issue on phone
The issue was that fragments had separate methods for search: setSearchMode() and setQueryString(). But now that fragments will never be in search mode when query is empty, there's no need to expose both methods. Changed setSearchMode() to non-public, and let setQueryString() call it when necessary, so now we don't have to issue unnecessary queries. Note this CL doesn't modify adapters, so they still have setSearchMode() and setQueryString() as separate, public methods. Also did a bit of cleaning up on how PeopleActivity handles search mode. (When I worked on it first time I wasn't too familiar with the code, so was afraid to change existing code too much, which left the code unnecessarily complicated.) Also removed all fragment.setSearchMode()/setQueryString() calls in ContactSelectionActivity.configureListFragment(). As far as I checked there's no way to invoke this activity with reqeust.isSearchMode/getQueryText set. Also removed ContactEntryListFragment.get/setContactRequest, which weren't used anywhere. Bug 5274171 Change-Id: I794db7ed54cb6b8f45d69430ec2f77e7fa83fb8c
Loading
Please register or sign in to comment