diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-07-14 00:02:27 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-07-20 01:33:10 -0700 |
commit | b72d8b2c8b999f3842dc7b0d93bb1a816b6204b9 (patch) | |
tree | b20bd154d07c5b169dd5745ffd12812b6c17baac /src/com/android/launcher3/accessibility | |
parent | f567ee8f42cab072f10002302d85e99083122481 (diff) | |
download | android_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.java | 6 |
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; } |