summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/accessibility
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-07-14 00:02:27 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-07-20 01:33:10 -0700
commitb72d8b2c8b999f3842dc7b0d93bb1a816b6204b9 (patch)
treeb20bd154d07c5b169dd5745ffd12812b6c17baac /src/com/android/launcher3/accessibility
parentf567ee8f42cab072f10002302d85e99083122481 (diff)
downloadandroid_packages_apps_Trebuchet-b72d8b2c8b999f3842dc7b0d93bb1a816b6204b9.tar.gz
android_packages_apps_Trebuchet-b72d8b2c8b999f3842dc7b0d93bb1a816b6204b9.tar.bz2
android_packages_apps_Trebuchet-b72d8b2c8b999f3842dc7b0d93bb1a816b6204b9.zip
Using common fling detection logic for notification and all-apps
> Refactoring SwipeDetector to both allow vertical and horizontal swipes > Using SwipeDetector and common overscroll effect for notification swipes instead of a separate logic Change-Id: Ib706ee179811ade59ddb68184e1c202365d147c4
Diffstat (limited to 'src/com/android/launcher3/accessibility')
-rw-r--r--src/com/android/launcher3/accessibility/ShortcutMenuAccessibilityDelegate.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/com/android/launcher3/accessibility/ShortcutMenuAccessibilityDelegate.java b/src/com/android/launcher3/accessibility/ShortcutMenuAccessibilityDelegate.java
index 816121995..b7c500fa6 100644
--- a/src/com/android/launcher3/accessibility/ShortcutMenuAccessibilityDelegate.java
+++ b/src/com/android/launcher3/accessibility/ShortcutMenuAccessibilityDelegate.java
@@ -50,8 +50,7 @@ public class ShortcutMenuAccessibilityDelegate extends LauncherAccessibilityDele
if ((host.getParent() instanceof DeepShortcutView)) {
info.addAction(mActions.get(ADD_TO_WORKSPACE));
} else if (host instanceof NotificationMainView) {
- NotificationMainView notificationView = (NotificationMainView) host;
- if (notificationView.canChildBeDismissed(notificationView)) {
+ if (((NotificationMainView) host).canChildBeDismissed()) {
info.addAction(mActions.get(DISMISS_NOTIFICATION));
}
}
@@ -88,8 +87,7 @@ public class ShortcutMenuAccessibilityDelegate extends LauncherAccessibilityDele
if (!(host instanceof NotificationMainView)) {
return false;
}
- NotificationMainView notificationView = (NotificationMainView) host;
- notificationView.onChildDismissed(notificationView);
+ ((NotificationMainView) host).onChildDismissed();
announceConfirmation(R.string.notification_dismissed);
return true;
}