History log of /frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d3f4b5864dd3f822dab92dbc414b82f5eb995192 24-Mar-2017 Michael Kwan <mkwan@google.com> Catch exception where SwipeDismissLayout cannot monitor screen off.

Monitoring screen off uses a BroadcastReceiver. However, there are
occasionally uses where SwipeDismissLayout is used in a context where
it cannot use a BroadcastReceiver, notably when used inside of one,
therefore we need to catch and handle the case where it is not applicable.

Bug: 36034260
Change-Id: I253875623a28532dbc8a2dc96fc9468221b0b781
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
390120b925398c754b4f785fc12a8def0d09c09b 14-Feb-2017 Michael Kwan <mkwan@google.com> Fix incorrect values for VelocityTracker in SwipeDismissLayout.

The offset used to adjust MotionEvents for swipe velocity tracking
was incorrect, and caused issues when touch points where close
together. Fixed the offset used, which resolved swiping issues.

Bug: 34673753
Change-Id: Ide6060b511510bcf299e3db778e6ffc6afda5e19
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
5758a9a94c7ca1a196b3d1c51b05ec2d937f0b59 12-Feb-2017 Michael Kwan <mkwan@google.com> Add tweaks to smooth out swipe to dismiss.

Bug: 34673753
Change-Id: I5a9d420c70d124fc764803d505291e66818b1aa2
(cherry picked from commit 2e11adaac3ec959044e8154c67b6ab9cde82fdab)
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
39dd370d8e0d04e1a860afc4136ad6bd6d521018 09-Jan-2017 Michael Kwan <mkwan@google.com> Check if the activity translucency was converted before converted back.

Bug: 34084490
Change-Id: Ib04c76549a31c7e523649f9d284637d44d7477ae
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
8a9b27773b2bd6f84a861bb0d38dcfebb3b8cfa7 14-Dec-2016 Michael Kwan <mkwan@google.com> Fix swipe-to-dismiss to properly react to swipe gestures.

Test: manual test
Bug: 33588580
Change-Id: If8d03f90a25e989e254e3a21bafef4e76bab5d7b
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
d7a313fb118fb6f5e5eaae6acff253038a85da4b 06-Dec-2016 Ned Burns <pixel@google.com> DO NOT MERGE Fix android:noHistory for Wear

Modifies swipe-to-close activities to be opaque by default (instead
of translucent by default). Previously, android:noHistory properties
on most activities in Wear were being ignored because they were
usually transitioning to a swipe-to-close activity that was marked
as translucent. This meant that the noHistory activity was still
technically visible, and so would never be culled from the task
history.

Now, we convert a swiped activity to translucent as soon as a swipe
begins, and convert it back after the swipe finishes. The previous
version of SDL tries to do this, but fails in the case where the
context is a ContextWrapper.

This approach is hacky and isn't merge-able into master. We leave
it DO NOT MERGE and will do a long-term fix after the holidays.

Test: Built a test app to verify that noHistory is now being
correctly respected. Manually verified that new activities start
out opaque and not translucent. Manually verified that Home
correctly starts/stops when it's revealed from underneath a
partially swiped activity. Tested general swipe behavior on Settings,
Contacts, Flashlight, Fit.

Bug: 33252029

Change-Id: Ib2e7f21ea1e0d52db03e78d25676501e5f73b31f
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
7d6cb913de9b51dba0bae79e527b7d4fe79eb35d 02-Dec-2016 Ned Burns <pixel@google.com> Modify SwipeDismissLayout to perform its own exit animation

Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.

Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
f7964be938338380654aaa41317b28335ed19084 01-Dec-2016 Michael Kwan <mkwan@google.com> Disable swipe-to-dismiss for not cancelable dialogs.

Bug: 33249829
Change-Id: Ib3d2c9982ece22d1b080b821eaf306f6b686d099
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
8a148a3b1de69a018867506a42774a47870f6f6c 08-Aug-2015 Bryce Lee <brycelee@google.com> Make sure that changes to UI in SwipeDismissLayout are on UI thread.

Bug: 23036658
Change-Id: I2f51f7275c24f32c5f291f58b0dd331e608d8beb
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
06756f352d2046246bc147fa1f55d1dfbfcb37f5 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Dismiss or cancel in SwipeDismissLayout on screen off.

Fix for situation where you palm the device while swiping away an
ambiactive activity (or rather, when you swipe slightly an ambiactive
activity during palm gesture). This would make the activity stay in half
dismissed state. Instead when the screen goes off, we either dismiss or
cancel the dismissal.

Change-Id: I82e699c00c25bc97dd95bc6473a17e5817f7667a
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
026e204ee461e101fe251742f6ffb09b1747c804 30-Apr-2015 Gus Prevas <kprevas@google.com> Fixes velocity tracking bug in SwipeDismissLayout.

This is the framework version of ag/682710.
Original change description:
This change adds a missing call to offsetLocation() when tracking
swipe velocities on a SwipeDismissLayout. This bug was causing
incorrect velocities to be measured which often resulted in an
incorrectly interpreted leftward swipe cancelling the dismiss
gesture.

Bug: 20350515
Change-Id: I4f3e3668a1f9aab963fdfa9095a43f4c5344703f
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
55555a3dab1f3b99a3299b90851624e9dc10f3cc 24-Apr-2015 Mark Renouf <mrenouf@google.com> Fixes rejected dismiss gestures (framework version of ag/677161)

Gus's original change description:

This change modifies the logic in SwipeDismissLayout which determines
whether or not a gesture should be interpreted as a dismiss
gesture.

Previously, on the first touch move event, the gesture was classified
as a dismiss gesture if the X movement exceeded the touch slop
and the Y movement did not. At this point the gesture was not
intercepted and the underlying widget (in the case of the cue
card, the GridViewPager) received all subsequent move events.

In the case of a very fast gesture at a slight vertical angle, it was
easy for the total Y movement to exceed the touch slop.
This change only rejects the gesture if the Y movement exceeds
the X movement, which is consistent with how GridViewPager
distinguishes horizontal vs. vertical swipes.
This change also cancels the dismissal if the end of the gesture
is a leftwards flight.

BUG: 20542762

(Same as b/20350515 but for Activity dismissal at the system level.)

Change-Id: I6e3fb646c42dda0d1c1f5552d91b27c6374fc08c
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
23958c6e2ffd4e76a88bc553fe2874d2f5f3f5e2 24-Feb-2015 Filip Gruszczynski <gruszczy@google.com> Force translucency from windowIsTranslucent on SwipeDismissLayout.

Bug: 18799741

Change-Id: Ifb05869f1bf080d7555d7728dc085c41cc2c277c
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
6eafa902cbc15fa35f8f0dfb5e559673fa67f637 14-Nov-2014 Filip Gruszczynski <gruszczy@google.com> SwipeDismissLayout makes activity opaque only after entry animation ends.

Bug: 18340863
Change-Id: Ic60fa2463618f86b1ae23fc4a0c06cd348f28334
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
625ec4849118f061a99558ad558b16020435a88d 23-Oct-2014 Filip Gruszczynski <gruszczy@google.com> Check if context is actually an activity.

Bug: 18101409
Change-Id: Iab21338ef4ccaab0ce66d664502e0b5e88ad9c50
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
3f8dd14451521d728fba548c7655d8fe531ed2ef 21-Oct-2014 Filip Gruszczynski <gruszczy@google.com> Disable activity's translucency until it starts being swiped away.

Change-Id: Ia5dceac7bd9ff57920a43736f9db6a33175e01ac
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
6c5c48a8b05e7668de551c3bf37aa3f33c7f0920 18-Jun-2014 Mark Renouf <mrenouf@google.com> Limit swipe dismiss progress to positive values

BUG: 15716749

Change-Id: Ibd6daa1a515611e5c9b8a02c6df75130aa8c093b
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
56e533a5f69e930608f6caf478d4fa5afc7c5eec 20-May-2014 Mindy Pereira <mindyp@google.com> Make a smaller cliff for dismissing cards

Fixes b/14997474 swipe to dismiss cliff guard may be too big

Change-Id: I3e681f1c6dc3eaac37a0e840b36f4c7041e86e62
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
072c6033fd48900f9f522aad1c984055e38d8380 07-May-2014 Mindy Pereira <mindyp@google.com> Make distance count when dismissing swipedismisslayout

verify the user's gesture took up at least 40% of the screen
before dismissing
Part of b/14319825 Cliff guard against accidental card dismissals

Works in conjunction with GridViewPager change:
https://googleplex-android-review.git.corp.google.com/#/c/461036/
Change-Id: Id8ff02d0a2d727b54c9950ad14ddef7a110f4eef
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
11b1469144d73ad0280ef9d0c2e478d180f17074 01-May-2014 Mark Renouf <mrenouf@google.com> Implement cliff guard for swipeDismiss gesture

BUG: 14319825

Change-Id: I6a80c91b4a6ee2eaf49a8c0c69065d4b97d7f8f2
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
df4ee5c8ac0830b23451ea466d48487f8b2205a0 06-Mar-2014 Justin Koh <justinkoh@google.com> Fix possible invalid pointer index in swipe dismiss.

Fix possible invalid pointer index in swipe dismiss: exit out if the pointer
index is -1. Also allow user to cancel this if in swipe mode.

Change-Id: I0f623ced0287679be8dd5c93ab6c67504b82fe9b
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java
ca6234e084a71e0c968cff404620298bcd971fcc 12-Feb-2014 Will Haldean Brown <haldean@google.com> Add swipe-to-dismiss support to PhoneWindow.

This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a
theme attribute to activate that feature. When the feature is
activated, a SwipeDismissLayout is inflated as the DecorView layout.
SwipeDismissLayout intercepts touch events and steals ones that are
large swipes to the right if its children don't. PhoneWindow registers
handlers that listen for these swipe events, translate the window when
necessary, and finish the activity at the end of the gesture.

Change-Id: I512e758f3c3ffd3b353dba3b911c0e80a88d6f5f
/frameworks/base/core/java/com/android/internal/widget/SwipeDismissLayout.java