71 lines
3.2 KiB
Java
71 lines
3.2 KiB
Java
package c.a.n;
|
|
|
|
import android.animation.Animator;
|
|
import android.animation.AnimatorInflater;
|
|
import android.graphics.Point;
|
|
import android.util.Log;
|
|
import android.view.MotionEvent;
|
|
import android.view.View;
|
|
import com.discord.overlay.OverlayManager;
|
|
import com.discord.overlay.R;
|
|
import com.discord.overlay.views.OverlayBubbleWrap;
|
|
import d0.z.d.m;
|
|
import java.util.Objects;
|
|
/* compiled from: OverlayManager.kt */
|
|
public final class a implements View.OnTouchListener {
|
|
public final /* synthetic */ OverlayManager i;
|
|
|
|
public a(OverlayManager overlayManager) {
|
|
this.i = overlayManager;
|
|
}
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:11:0x0030 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:19:0x00aa */
|
|
@Override // android.view.View.OnTouchListener
|
|
public final boolean onTouch(View view, MotionEvent motionEvent) {
|
|
boolean z2;
|
|
m.checkNotNullExpressionValue(motionEvent, "event");
|
|
int action = motionEvent.getAction();
|
|
if (action == 1 || action == 2) {
|
|
c.a.n.h.a aVar = this.i.m;
|
|
if (aVar != null) {
|
|
if (aVar.m.contains((int) motionEvent.getRawX(), (int) motionEvent.getRawY())) {
|
|
z2 = true;
|
|
if (!z2) {
|
|
Objects.requireNonNull(view, "null cannot be cast to non-null type com.discord.overlay.views.OverlayBubbleWrap");
|
|
OverlayBubbleWrap overlayBubbleWrap = (OverlayBubbleWrap) view;
|
|
if (motionEvent.getAction() == 1) {
|
|
OverlayManager overlayManager = this.i;
|
|
Objects.requireNonNull(overlayManager);
|
|
Point point = overlayBubbleWrap.v;
|
|
if (point != null) {
|
|
Point point2 = overlayBubbleWrap.u;
|
|
point2.x = point.x;
|
|
point2.y = point.y;
|
|
String simpleName = overlayBubbleWrap.getClass().getSimpleName();
|
|
StringBuilder R = c.d.b.a.a.R("Moved to anchor [");
|
|
R.append(overlayBubbleWrap.u);
|
|
R.append(']');
|
|
Log.d(simpleName, R.toString());
|
|
}
|
|
overlayManager.c(null);
|
|
Animator loadAnimator = AnimatorInflater.loadAnimator(overlayBubbleWrap.getContext(), R.a.fade_out);
|
|
loadAnimator.setTarget(overlayBubbleWrap);
|
|
loadAnimator.addListener(new e(overlayManager, overlayBubbleWrap));
|
|
loadAnimator.start();
|
|
OverlayBubbleWrap.c(overlayBubbleWrap, (int) overlayBubbleWrap.getX(), (overlayBubbleWrap.getHeight() / 2) + ((int) overlayBubbleWrap.getY()), null, 4, null);
|
|
return true;
|
|
}
|
|
this.i.c(overlayBubbleWrap);
|
|
} else {
|
|
this.i.c(null);
|
|
}
|
|
}
|
|
}
|
|
z2 = false;
|
|
if (!z2) {
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|