Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6aaeba20 authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Remove background padding workaround from SuggestionsAdapter

Romain has checked in a framework fix,
https://android-git.corp.google.com/g/8218
so the workaround added in
https://android-git.corp.google.com/g/8209
is no longer needed.

Fixes http://b/issue?id=1996635
parent b551fb87
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -360,10 +360,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
            newBg.addState(new int[]{android.R.attr.state_selected}, transparent);
            newBg.addState(new int[]{android.R.attr.state_selected}, transparent);
            newBg.addState(new int[]{android.R.attr.state_pressed}, transparent);
            newBg.addState(new int[]{android.R.attr.state_pressed}, transparent);
            newBg.addState(new int[]{}, background);
            newBg.addState(new int[]{}, background);
            // Workaround for the fact that StateListDrawable.getPadding(Rect) always returns
            // true, and thus sets the padding of any view that has it as a background.
            ((DrawableContainer.DrawableContainerState) newBg.getConstantState())
                    .setVariablePadding(true);
            mBackgroundsCache.put(backgroundColor, newBg.getConstantState());
            mBackgroundsCache.put(backgroundColor, newBg.getConstantState());
            return newBg;
            return newBg;
        }
        }