diff options
author | Andrew Lee <anwlee@google.com> | 2015-05-27 12:25:23 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-05-27 16:39:58 -0700 |
commit | c940eada912f952a95d693ae6aab48ef08ef7319 (patch) | |
tree | 5df11a4fdc20073b1ad119b38077f76c3b7ac213 /src | |
parent | a56893c156b997d796cd8343f99acd5d4198a280 (diff) |
Fix Talkback focus for call log action views.
Bug: 21448455
Change-Id: Icb9f37643d12dde2d46743d2ce3aa2fade7a68a1
Diffstat (limited to 'src')
-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); } |