summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQi Wang <wangqi@google.com>2016-03-14 17:46:26 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-03-14 17:46:26 +0000
commit33c27563486149faff13521667af8da7c01d6937 (patch)
tree2e7e783bf60063ec600de94c22c2869512b03c0e /src
parent39f4dd293c3513476e8b75ff30aebdbdc72ee6ea (diff)
parent470dd5f28d6c3c005ab839e5fc238e679865e278 (diff)
Merge "Add talkback for long press and remove contact from starred list." into nyc-dev am: 7934175406
am: 470dd5f28d * commit '470dd5f28d6c3c005ab839e5fc238e679865e278': Add talkback for long press and remove contact from starred list.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/ListsFragment.java4
-rw-r--r--src/com/android/dialer/list/RemoveView.java5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index 52bf3cbb5..ceed61274 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -81,7 +81,6 @@ public class ListsFragment extends Fragment
private ViewPagerTabs mViewPagerTabs;
private ViewPagerAdapter mViewPagerAdapter;
private RemoveView mRemoveView;
- private View mRemoveViewContent;
private SpeedDialFragment mSpeedDialFragment;
private CallLogFragment mHistoryFragment;
@@ -252,7 +251,6 @@ public class ListsFragment extends Fragment
addOnPageChangeListener(mViewPagerTabs);
mRemoveView = (RemoveView) parentView.findViewById(R.id.remove_view);
- mRemoveViewContent = parentView.findViewById(R.id.remove_view_content);
Trace.endSection();
Trace.endSection();
@@ -424,7 +422,7 @@ public class ListsFragment extends Fragment
public void showRemoveView(boolean show) {
- mRemoveViewContent.setVisibility(show ? View.VISIBLE : View.GONE);
+ mRemoveView.setVisibility(show ? View.VISIBLE : View.GONE);
mRemoveView.setAlpha(show ? 0 : 1);
mRemoveView.animate().alpha(show ? 1 : 0).start();
}
diff --git a/src/com/android/dialer/list/RemoveView.java b/src/com/android/dialer/list/RemoveView.java
index fdb08f6f5..41f41752e 100644
--- a/src/com/android/dialer/list/RemoveView.java
+++ b/src/com/android/dialer/list/RemoveView.java
@@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.DragEvent;
+import android.view.accessibility.AccessibilityEvent;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -53,6 +54,9 @@ public class RemoveView extends FrameLayout {
final int action = event.getAction();
switch (action) {
case DragEvent.ACTION_DRAG_ENTERED:
+ // TODO: This is temporary solution and should be removed once accessibility for
+ // drag and drop is supported by framework(b/26871588).
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_ANNOUNCEMENT);
setAppearanceHighlighted();
break;
case DragEvent.ACTION_DRAG_EXITED:
@@ -65,6 +69,7 @@ public class RemoveView extends FrameLayout {
}
break;
case DragEvent.ACTION_DROP:
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_ANNOUNCEMENT);
if (mDragDropController != null) {
mDragDropController.handleDragFinished((int) event.getX(), (int) event.getY(),
true);