diff options
author | Yuichi Biwa <yuichi.xa.biwa@sonymobile.com> | 2015-11-30 14:43:34 +0900 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-08-31 22:21:04 -0700 |
commit | 535eb072bb5640cdf95a16687707a33166afb6bd (patch) | |
tree | 529790947eca332ed06eb38719914cef203ffd4b | |
parent | 37e98676f0366c60a548cd47ab255c2a7f31117d (diff) | |
download | base-535eb072bb5640cdf95a16687707a33166afb6bd.tar.gz |
ChooserActivity: Cannot start app that the icon overflows the layout
Symptom:
When sharing an image from Album, ChooserActivity can be shown.
But then the app to be located to the bottom part of the list may not
be started even if user tap it.
Root cause:
ChooserActivity uses ResolverDrawerLayout. And ResolverDrawerLayout
can display only some items on the list (known as "Collapse mode").
When the item clipping along the bottom edge is tapped by the user,
ResolverDrawerLayout tries to expand the list and scroll it to a
better position, instead of starting an application.
In this problem case, ResolverDrawerLayout continues to try to expand
the list whenever tapping, so an application will never start.
Solution:
Change a condition so that mOpenOnClick becomes true only when the list
has been collapsed (mCollapseOffset > 0).
Bug: 30153542
Change-Id: I576fb6c8b6a91d79c1e0d46d069146779f4dbd17
(cherry picked from commit 4f3a843ea9b6ffe2e29e6625ffb3d87fbf143623)
(cherry picked from commit cb3e1237b5aacb03523a0f2e597326c2662877cf)
-rw-r--r-- | core/java/com/android/internal/widget/ResolverDrawerLayout.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/ResolverDrawerLayout.java b/core/java/com/android/internal/widget/ResolverDrawerLayout.java index 8b9d5034b0c2..e84cc279b403 100644 --- a/core/java/com/android/internal/widget/ResolverDrawerLayout.java +++ b/core/java/com/android/internal/widget/ResolverDrawerLayout.java @@ -245,7 +245,7 @@ public class ResolverDrawerLayout extends ViewGroup { final float y = ev.getY(); mInitialTouchX = x; mInitialTouchY = mLastTouchY = y; - mOpenOnClick = isListChildUnderClipped(x, y) && mCollapsibleHeight > 0; + mOpenOnClick = isListChildUnderClipped(x, y) && mCollapseOffset > 0; } break; |