From 1f75d66d269ed12647bc5240566e0b54bc39acf7 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Wed, 30 Sep 2020 10:16:41 -0400 Subject: [PATCH] Fix TileDecoration when dragging in QSCustomizer Do not decorate (draw background) for the tile being dragged. Test: manual Fixes: 157445536 Change-Id: I03a4041ad173e4b53c77931491115de6da6172a9 --- .../src/com/android/systemui/qs/customize/TileAdapter.java | 6 ++++++ 1 file changed, 6 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 bffeb3ec3c70b..e049025ba9bd4 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java @@ -607,6 +607,12 @@ public class TileAdapter extends RecyclerView.Adapter implements TileSta for (int i = 0; i < childCount; i++) { final View child = parent.getChildAt(i); final ViewHolder holder = parent.getChildViewHolder(child); + // Do not draw background for the holder that's currently being dragged + if (holder == mCurrentDrag) { + continue; + } + // Do not draw background for holders before the edit index (header and current + // tiles) if (holder.getAdapterPosition() == 0 || holder.getAdapterPosition() < mEditIndex && !(child instanceof TextView)) { continue;