Cleaning Utilities.java

> Removing some unused methods
> Moving some specialized methods to corresponding classes
> Removing GridProvider check as it is released

Bug: 257555083
Test: Presubmit
Change-Id: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
Merged-In: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
This commit is contained in:
Sunny Goyal committed 2022-11-17 01:06:16 +00:00
1 parent 50306445a1
commit 47d4d81b4f
12 files changed
+110 -269

No files matched your search

@@ -607,15 +607,16 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
* Get the icon bounds on the view depending on the layout type.
*/
public void getIconBounds(int iconSize, Rect outBounds) {
Utilities.setRectToViewCenter(this, iconSize, outBounds);
outBounds.set(0, 0, iconSize, iconSize);
if (mLayoutHorizontal) {
int top = (getHeight() - iconSize) / 2;
if (mIsRtl) {
outBounds.offsetTo(getWidth() - iconSize - getPaddingRight(), outBounds.top);
outBounds.offsetTo(getWidth() - iconSize - getPaddingRight(), top);
} else {
outBounds.offsetTo(getPaddingLeft(), outBounds.top);
outBounds.offsetTo(getPaddingLeft(), top);
}
} else {
outBounds.offsetTo(outBounds.left, getPaddingTop());
outBounds.offset((getWidth() - iconSize) / 2, getPaddingTop());
}
}