Merge "QS: Fix accidental a11y tile removal" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
797b658428
@@ -297,6 +297,9 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
|
|||||||
mAccessibilityMoving = false;
|
mAccessibilityMoving = false;
|
||||||
mTiles.remove(mEditIndex--);
|
mTiles.remove(mEditIndex--);
|
||||||
notifyItemRemoved(mEditIndex - 1);
|
notifyItemRemoved(mEditIndex - 1);
|
||||||
|
// Don't remove items when the last position is selected.
|
||||||
|
if (position == mEditIndex) position--;
|
||||||
|
|
||||||
move(mAccessibilityFromIndex, position, v);
|
move(mAccessibilityFromIndex, position, v);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user