[automerger] Removing accessibility action for Clear-all am: 442fc108c3

Change-Id: I994543bd712963b26ab2b29e279a1758f4468520
This commit is contained in:
Android Build Merger (Role) 2018-05-30 00:36:24 +00:00
commit a3e47fe80c
4 changed files with 0 additions and 67 deletions

View File

@ -20,10 +20,8 @@ import android.graphics.Canvas;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import android.view.accessibility.AccessibilityNodeInfo;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.quickstep.RecentsActivity;
import com.android.quickstep.util.LayoutUtils;
import com.android.quickstep.views.RecentsView;
@ -73,21 +71,4 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity> {
// Just use the activity task size for multi-window as well.
return false;
}
@Override
public void addTaskAccessibilityActionsExtra(AccessibilityNodeInfo info) {
info.addAction(
new AccessibilityNodeInfo.AccessibilityAction(
R.string.recents_clear_all,
getContext().getText(R.string.recents_clear_all)));
}
@Override
public boolean performTaskAccessibilityActionExtra(int action) {
if (action == R.string.recents_clear_all) {
dismissAllTasks();
return true;
}
return false;
}
}

View File

@ -1367,9 +1367,6 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
return true;
}
public void addTaskAccessibilityActionsExtra(AccessibilityNodeInfo info) {
}
public boolean performTaskAccessibilityActionExtra(int action) {
return false;
}

View File

@ -28,9 +28,6 @@ import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Path.Direction;
import android.graphics.Path.Op;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import android.util.AttributeSet;
import com.android.launcher3.DeviceProfile;
@ -51,7 +48,6 @@ public class ShelfScrimView extends ScrimView {
private static final int THRESHOLD_ALPHA_DARK = 102;
private static final int THRESHOLD_ALPHA_LIGHT = 46;
private static final int THRESHOLD_ALPHA_SUPER_LIGHT = 128;
private static final int CLEAR_ALL_TASKS = R.string.recents_clear_all;
// In transposed layout, we simply draw a flat color.
private boolean mDrawingFlatColor;
@ -208,43 +204,4 @@ public class ShelfScrimView extends ScrimView {
mRadius, mRadius, mPaint);
return minTop - mDragHandleSize - top;
}
@NonNull
@Override
protected AccessibilityHelper createAccessibilityHelper() {
return new ShelfScrimAccessibilityHelper();
}
protected class ShelfScrimAccessibilityHelper extends AccessibilityHelper {
@Override
protected void onPopulateNodeForVirtualView(int virtualViewId,
AccessibilityNodeInfoCompat node) {
super.onPopulateNodeForVirtualView(virtualViewId, node);
if (mLauncher.isInState(OVERVIEW)) {
final RecentsView overviewPanel = mLauncher.getOverviewPanel();
if (overviewPanel.getChildCount() != 0) {
node.addAction(
new AccessibilityNodeInfoCompat.AccessibilityActionCompat(
CLEAR_ALL_TASKS,
getContext().getText(CLEAR_ALL_TASKS)));
}
}
}
@Override
protected boolean onPerformActionForVirtualView(
int virtualViewId, int action, Bundle arguments) {
if (super.onPerformActionForVirtualView(virtualViewId, action, arguments)) return true;
if (action == CLEAR_ALL_TASKS) {
if (mLauncher.isInState(OVERVIEW)) {
mLauncher.<RecentsView>getOverviewPanel().dismissAllTasks();
}
return true;
}
return false;
}
}
}

View File

@ -321,8 +321,6 @@ public class TaskView extends FrameLayout implements TaskCallbacks, PageCallback
}
final RecentsView recentsView = getRecentsView();
recentsView.addTaskAccessibilityActionsExtra(info);
final AccessibilityNodeInfo.CollectionItemInfo itemInfo =
AccessibilityNodeInfo.CollectionItemInfo.obtain(
0, 1, recentsView.getChildCount() - recentsView.indexOfChild(this) - 1, 1,