summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2016-06-07 14:30:10 -0700
committerAdam Cohen <adamcohen@google.com>2016-06-07 14:33:03 -0700
commit6e92f05314ae240dccd11347ea86529066b528b3 (patch)
tree08cc359f5556a39bde06027ce316d86d5f589781 /src
parent02d3d43d97a06b8066495de8eeb63a46ee98b7f2 (diff)
downloadandroid_packages_apps_Trebuchet-6e92f05314ae240dccd11347ea86529066b528b3.tar.gz
android_packages_apps_Trebuchet-6e92f05314ae240dccd11347ea86529066b528b3.tar.bz2
android_packages_apps_Trebuchet-6e92f05314ae240dccd11347ea86529066b528b3.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java4
-rw-r--r--src/com/android/launcher3/allapps/AllAppsGridAdapter.java4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
index aa6e08ebc..6bf8abf30 100644
--- a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
+++ b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
@@ -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));
}
}
diff --git a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
index 115db9dff..81a05a23b 100644
--- a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
+++ b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
@@ -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: