Ensure that custom actions are available to all apps items

-> When BubbleTextViews were being recycled, the RecyclerView was clearing the
   AccessibilityDelegate. Ensure that this is reset by the adapter when a
   BubbleTextView is reused.

issue 25948877

Change-Id: I95dd21bfdcd602a67925d1b8f06e6ca92d1d7203
This commit is contained in:
Adam Cohen
2016-06-07 14:30:10 -07:00
parent 02d3d43d97
commit 6e92f05314
2 changed files with 7 additions and 1 deletions

View File

@@ -511,12 +511,16 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
AppInfo info = mApps.getAdapterItems().get(position).appInfo;
BubbleTextView icon = (BubbleTextView) holder.mContent;
icon.applyFromApplicationInfo(info);
icon.setAccessibilityDelegate(
LauncherAppState.getInstance().getAccessibilityDelegate());
break;
}
case PREDICTION_ICON_VIEW_TYPE: {
AppInfo info = mApps.getAdapterItems().get(position).appInfo;
BubbleTextView icon = (BubbleTextView) holder.mContent;
icon.applyFromApplicationInfo(info);
icon.setAccessibilityDelegate(
LauncherAppState.getInstance().getAccessibilityDelegate());
break;
}
case EMPTY_SEARCH_VIEW_TYPE: