summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2018-05-16 11:26:17 -0700
committerVadim Tryshev <vadimt@google.com>2018-05-16 12:00:33 -0700
commit3f51631b806fb81e2b76a626edcb78f1b46118d1 (patch)
tree5a47e387b68e890f13a1147799430e0140f945d8 /src/com
parentd9a1337b40fcb1041bba48cd59d7f358f5b7895f (diff)
downloadandroid_packages_apps_Trebuchet-3f51631b806fb81e2b76a626edcb78f1b46118d1.tar.gz
android_packages_apps_Trebuchet-3f51631b806fb81e2b76a626edcb78f1b46118d1.tar.bz2
android_packages_apps_Trebuchet-3f51631b806fb81e2b76a626edcb78f1b46118d1.zip
Adding Clear All to accessibility chevron on Recents
For motivation, see email thread "Tweaks to for the reverted order of accessibility swiping" This doesn't add the action to the fallback Recents, so it will require more work. Bug: 79165501 Test: Manual Change-Id: I99d608ccc13cc1742dc4d427e763125788e8edd2
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/views/ScrimView.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/launcher3/views/ScrimView.java b/src/com/android/launcher3/views/ScrimView.java
index 5dcfe4a70..49e96be6e 100644
--- a/src/com/android/launcher3/views/ScrimView.java
+++ b/src/com/android/launcher3/views/ScrimView.java
@@ -38,6 +38,7 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
@@ -113,12 +114,17 @@ public class ScrimView extends View implements Insettable, OnChangeListener,
.getDimensionPixelSize(R.dimen.vertical_drag_handle_size);
mDragHandleBounds = new Rect(0, 0, mDragHandleSize, mDragHandleSize);
- mAccessibilityHelper = new AccessibilityHelper();
+ mAccessibilityHelper = createAccessibilityHelper();
ViewCompat.setAccessibilityDelegate(this, mAccessibilityHelper);
mAM = (AccessibilityManager) context.getSystemService(ACCESSIBILITY_SERVICE);
}
+ @NonNull
+ protected AccessibilityHelper createAccessibilityHelper() {
+ return new AccessibilityHelper();
+ }
+
@Override
public void setInsets(Rect insets) {
updateDragHandleBounds();
@@ -190,6 +196,9 @@ public class ScrimView extends View implements Insettable, OnChangeListener,
if (mCurrentFlatColor != 0) {
canvas.drawColor(mCurrentFlatColor);
}
+ if (mDragHandle != null) {
+ mDragHandle.draw(canvas);
+ }
}
@Override
@@ -323,7 +332,7 @@ public class ScrimView extends View implements Insettable, OnChangeListener,
: IMPORTANT_FOR_ACCESSIBILITY_AUTO);
}
- private class AccessibilityHelper extends ExploreByTouchHelper {
+ protected class AccessibilityHelper extends ExploreByTouchHelper {
private static final int DRAG_HANDLE_ID = 1;