summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-05-27 12:31:17 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-06-07 10:31:49 -0700
commit8653f1d748f436403fd25589eeaafe1203803da9 (patch)
tree051ba9032c8c0ec6109c014b3971f6bd3d9b2c88 /src/com/android/launcher3/allapps/AllAppsGridAdapter.java
parent2a5b356375e15602acab429642064c566a1a1f4d (diff)
downloadandroid_packages_apps_Trebuchet-8653f1d748f436403fd25589eeaafe1203803da9.tar.gz
android_packages_apps_Trebuchet-8653f1d748f436403fd25589eeaafe1203803da9.tar.bz2
android_packages_apps_Trebuchet-8653f1d748f436403fd25589eeaafe1203803da9.zip
Updating the app search buton text
Bug: 28774501 Change-Id: I268a2d98f70d160c91ebd8fc796f3626ae67c159
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsGridAdapter.java')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsGridAdapter.java22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
index 115db9dff..cfa67b1ed 100644
--- a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
+++ b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
@@ -351,12 +351,6 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
// The text to show when there are no search results and no market search handler.
private String mEmptySearchMessage;
- // The name of the market app which handles searches, to be used in the format str
- // below when updating the search-market view. Only needs to be loaded once.
- private String mMarketAppName;
- // The text to show when there is a market app which can handle a specific query, updated
- // each time the search query changes.
- private String mMarketSearchMessage;
// The intent to send off to the market app, updated each time the search query changes.
private Intent mMarketSearchIntent;
@@ -402,14 +396,6 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
public void setSearchController(AllAppsSearchBarController searchController) {
mSearchController = searchController;
-
- // Resolve the market app handling additional searches
- PackageManager pm = mLauncher.getPackageManager();
- ResolveInfo marketInfo = pm.resolveActivity(mSearchController.createMarketSearchIntent(""),
- PackageManager.MATCH_DEFAULT_ONLY);
- if (marketInfo != null) {
- mMarketAppName = marketInfo.loadLabel(pm).toString();
- }
}
/**
@@ -419,11 +405,7 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
public void setLastSearchQuery(String query) {
Resources res = mLauncher.getResources();
mEmptySearchMessage = res.getString(R.string.all_apps_no_search_results, query);
- if (mMarketAppName != null) {
- mMarketSearchMessage = res.getString(R.string.all_apps_search_market_message,
- mMarketAppName);
- mMarketSearchIntent = mSearchController.createMarketSearchIntent(query);
- }
+ mMarketSearchIntent = mSearchController.createMarketSearchIntent(query);
}
/**
@@ -529,10 +511,8 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
TextView searchView = (TextView) holder.mContent;
if (mMarketSearchIntent != null) {
searchView.setVisibility(View.VISIBLE);
- searchView.setContentDescription(mMarketSearchMessage);
searchView.setGravity(mApps.hasNoFilteredResults() ? Gravity.CENTER :
Gravity.START | Gravity.CENTER_VERTICAL);
- searchView.setText(mMarketSearchMessage);
} else {
searchView.setVisibility(View.GONE);
}