what-the-bank/sources/o/C17469wxr.java

51 lines
1.7 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
/* renamed from: o.wxr, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C17469wxr {
private static final ThreadLocal<Matrix> c = new ThreadLocal<>();
private static final ThreadLocal<RectF> a = new ThreadLocal<>();
public static void lF_(ViewGroup viewGroup, View view, Rect rect) {
rect.set(0, 0, view.getWidth(), view.getHeight());
ThreadLocal<Matrix> threadLocal = c;
Matrix matrix = threadLocal.get();
if (matrix == null) {
matrix = new Matrix();
threadLocal.set(matrix);
} else {
matrix.reset();
}
lG_(viewGroup, view, matrix);
ThreadLocal<RectF> threadLocal2 = a;
RectF rectF = threadLocal2.get();
if (rectF == null) {
rectF = new RectF();
threadLocal2.set(rectF);
}
rectF.set(rect);
matrix.mapRect(rectF);
rect.set((int) (rectF.left + 0.5f), (int) (rectF.top + 0.5f), (int) (rectF.right + 0.5f), (int) (rectF.bottom + 0.5f));
}
private static void lG_(ViewParent viewParent, View view, Matrix matrix) {
Object parent = view.getParent();
if ((parent instanceof View) && parent != viewParent) {
lG_(viewParent, (View) parent, matrix);
matrix.preTranslate(-r0.getScrollX(), -r0.getScrollY());
}
matrix.preTranslate(view.getLeft(), view.getTop());
if (view.getMatrix().isIdentity()) {
return;
}
matrix.preConcat(view.getMatrix());
}
}