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

Commit 677ce21f authored by Adam Cohen's avatar Adam Cohen
Browse files

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
(cherry picked from commit 6e92f053)
parent 9953770e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -118,7 +118,9 @@ public class LauncherAccessibilityDelegate extends AccessibilityDelegate impleme
                    info.addAction(mActions.get(RESIZE));
                }
            }
        } if ((item instanceof AppInfo) || (item instanceof PendingAddItemInfo)) {
        }

        if ((item instanceof AppInfo) || (item instanceof PendingAddItemInfo)) {
            info.addAction(mActions.get(ADD_TO_WORKSPACE));
        }
    }
+4 −0
Original line number Diff line number Diff line
@@ -564,12 +564,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: