185 lines
5.0 KiB
Java
185 lines
5.0 KiB
Java
package o;
|
|
|
|
import android.view.View;
|
|
import android.view.ViewParent;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class FgG {
|
|
public ViewParent a;
|
|
private int[] b;
|
|
public boolean c;
|
|
public final View d;
|
|
private ViewParent e;
|
|
|
|
public FgG(View view) {
|
|
this.d = view;
|
|
}
|
|
|
|
public final boolean a(int i, int i2) {
|
|
if (e(i2)) {
|
|
return true;
|
|
}
|
|
if (!this.c) {
|
|
return false;
|
|
}
|
|
View view = this.d;
|
|
for (ViewParent parent = this.d.getParent(); parent != null; parent = parent.getParent()) {
|
|
if (C16515owF.tf_(parent, view, this.d, i, i2)) {
|
|
if (i2 == 0) {
|
|
this.a = parent;
|
|
} else if (i2 == 1) {
|
|
this.e = parent;
|
|
}
|
|
C16515owF.te_(parent, view, this.d, i, i2);
|
|
return true;
|
|
}
|
|
if (parent instanceof View) {
|
|
view = (View) parent;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final boolean c(int i, int i2, int i3, int i4, int[] iArr, int i5, int[] iArr2) {
|
|
ViewParent viewParent;
|
|
int i6;
|
|
int i7;
|
|
int[] iArr3;
|
|
if (this.c) {
|
|
if (i5 != 0) {
|
|
viewParent = i5 != 1 ? null : this.e;
|
|
} else {
|
|
viewParent = this.a;
|
|
}
|
|
if (viewParent == null) {
|
|
return false;
|
|
}
|
|
if (i != 0 || i2 != 0 || i3 != 0 || i4 != 0) {
|
|
if (iArr != null) {
|
|
this.d.getLocationInWindow(iArr);
|
|
i6 = iArr[0];
|
|
i7 = iArr[1];
|
|
} else {
|
|
i6 = 0;
|
|
i7 = 0;
|
|
}
|
|
if (iArr2 == null) {
|
|
if (this.b == null) {
|
|
this.b = new int[2];
|
|
}
|
|
int[] iArr4 = this.b;
|
|
iArr4[0] = 0;
|
|
iArr4[1] = 0;
|
|
iArr3 = iArr4;
|
|
} else {
|
|
iArr3 = iArr2;
|
|
}
|
|
C16515owF.td_(viewParent, this.d, i, i2, i3, i4, i5, iArr3);
|
|
if (iArr != null) {
|
|
this.d.getLocationInWindow(iArr);
|
|
iArr[0] = iArr[0] - i6;
|
|
iArr[1] = iArr[1] - i7;
|
|
}
|
|
return true;
|
|
}
|
|
if (iArr != null) {
|
|
iArr[0] = 0;
|
|
iArr[1] = 0;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final boolean d(float f, float f2, boolean z) {
|
|
ViewParent viewParent;
|
|
if (!this.c || (viewParent = this.a) == null) {
|
|
return false;
|
|
}
|
|
return C16515owF.ta_(viewParent, this.d, f, f2, z);
|
|
}
|
|
|
|
public final boolean b(float f, float f2) {
|
|
ViewParent viewParent;
|
|
if (!this.c || (viewParent = this.a) == null) {
|
|
return false;
|
|
}
|
|
return C16515owF.tb_(viewParent, this.d, f, f2);
|
|
}
|
|
|
|
public final boolean a(int i, int i2, int[] iArr, int[] iArr2, int i3) {
|
|
ViewParent viewParent;
|
|
int i4;
|
|
int i5;
|
|
if (!this.c) {
|
|
return false;
|
|
}
|
|
if (i3 != 0) {
|
|
viewParent = i3 != 1 ? null : this.e;
|
|
} else {
|
|
viewParent = this.a;
|
|
}
|
|
ViewParent viewParent2 = viewParent;
|
|
if (viewParent2 == null) {
|
|
return false;
|
|
}
|
|
if (i == 0 && i2 == 0) {
|
|
if (iArr2 == null) {
|
|
return false;
|
|
}
|
|
iArr2[0] = 0;
|
|
iArr2[1] = 0;
|
|
return false;
|
|
}
|
|
if (iArr2 != null) {
|
|
this.d.getLocationInWindow(iArr2);
|
|
i4 = iArr2[0];
|
|
i5 = iArr2[1];
|
|
} else {
|
|
i4 = 0;
|
|
i5 = 0;
|
|
}
|
|
if (iArr == null) {
|
|
if (this.b == null) {
|
|
this.b = new int[2];
|
|
}
|
|
iArr = this.b;
|
|
}
|
|
iArr[0] = 0;
|
|
iArr[1] = 0;
|
|
C16515owF.tc_(viewParent2, this.d, i, i2, iArr, i3);
|
|
if (iArr2 != null) {
|
|
this.d.getLocationInWindow(iArr2);
|
|
iArr2[0] = iArr2[0] - i4;
|
|
iArr2[1] = iArr2[1] - i5;
|
|
}
|
|
return (iArr[0] == 0 && iArr[1] == 0) ? false : true;
|
|
}
|
|
|
|
public final boolean e(int i) {
|
|
ViewParent viewParent;
|
|
if (i != 0) {
|
|
viewParent = i != 1 ? null : this.e;
|
|
} else {
|
|
viewParent = this.a;
|
|
}
|
|
return viewParent != null;
|
|
}
|
|
|
|
public final void a(int i) {
|
|
ViewParent viewParent;
|
|
if (i != 0) {
|
|
viewParent = i != 1 ? null : this.e;
|
|
} else {
|
|
viewParent = this.a;
|
|
}
|
|
if (viewParent != null) {
|
|
C16515owF.tg_(viewParent, this.d, i);
|
|
if (i == 0) {
|
|
this.a = null;
|
|
} else if (i == 1) {
|
|
this.e = null;
|
|
}
|
|
}
|
|
}
|
|
}
|