summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java11
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);
}