From c896963063ce86d272c08430e739bdf0c8f50bf9 Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Fri, 5 Aug 2016 10:08:11 -0400 Subject: [PATCH] QS: Fix accidental a11y tile removal Change-Id: I5b5c3bac0b92a7cc5585dcd55571fa055da0e5eb Fixes: 30443933 --- .../src/com/android/systemui/qs/customize/TileAdapter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java index 3a693cff7cc94..8d7f6ee728507 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java @@ -297,6 +297,9 @@ public class TileAdapter extends RecyclerView.Adapter implements TileSta mAccessibilityMoving = false; mTiles.remove(mEditIndex--); notifyItemRemoved(mEditIndex - 1); + // Don't remove items when the last position is selected. + if (position == mEditIndex) position--; + move(mAccessibilityFromIndex, position, v); notifyDataSetChanged(); }