diff options
author | Andrew Lee <anwlee@google.com> | 2015-05-27 23:40:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-27 23:40:39 +0000 |
commit | ec3fa8255f547b4ed3fa5c50b62283e7291f519a (patch) | |
tree | 8841b77a5c150f60f17a0d2a7118a6a48873b93c | |
parent | 0d70f70a37fc6bb9db9b342dfd8e9c79386b595e (diff) | |
parent | c940eada912f952a95d693ae6aab48ef08ef7319 (diff) |
Merge "Fix Talkback focus for call log action views." into mnc-dev
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 5c57c1854..cbe5b297d 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -164,10 +164,15 @@ public class CallLogAdapter extends GroupingListAdapter */ private AccessibilityDelegate mAccessibilityDelegate = new AccessibilityDelegate() { @Override - public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, - AccessibilityEvent event) { + public boolean onRequestSendAccessibilityEvent( + ViewGroup host, View child, AccessibilityEvent event) { if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) { - expandViewHolderActions((CallLogListItemViewHolder) host.getTag()); + // Only expand if actions are not already expanded, because triggering the expand + // function on clicks causes the action views to lose the focus indicator. + CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) host.getTag(); + if (mCurrentlyExpandedPosition != viewHolder.getAdapterPosition()) { + expandViewHolderActions((CallLogListItemViewHolder) host.getTag()); + } } return super.onRequestSendAccessibilityEvent(host, child, event); } |