Drop unnecessary elses after returns

This commit is contained in:
Daniel Martí 2016-02-09 15:58:47 +00:00
parent 9997b0f448
commit 401a1d473d
2 changed files with 7 additions and 9 deletions

View File

@ -546,12 +546,11 @@ public class AppProvider extends FDroidProvider {
if (TextUtils.isEmpty(query)) { if (TextUtils.isEmpty(query)) {
// Return all the things for an empty search. // Return all the things for an empty search.
return getContentUri(); return getContentUri();
} else {
return getContentUri().buildUpon()
.appendPath(PATH_SEARCH)
.appendPath(query)
.build();
} }
return getContentUri().buildUpon()
.appendPath(PATH_SEARCH)
.appendPath(query)
.build();
} }
public static Uri getSearchInstalledUri(String query) { public static Uri getSearchInstalledUri(String query) {

View File

@ -199,11 +199,10 @@ public abstract class AppListFragment extends ListFragment implements
onSearchStopped(); onSearchStopped();
setEmptyText(getEmptyMessage()); setEmptyText(getEmptyMessage());
return false; return false;
} else {
onSearch();
setEmptyText(getNoSearchResultsMessage());
return true;
} }
onSearch();
setEmptyText(getNoSearchResultsMessage());
return true;
} }
public void updateSearchQuery(@Nullable String query) { public void updateSearchQuery(@Nullable String query) {