- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
71 lines
2.4 KiB
Java
71 lines
2.4 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.PointF;
|
|
import android.view.GestureDetector;
|
|
import android.view.MotionEvent;
|
|
import android.view.View;
|
|
import com.applovin.impl.xg;
|
|
|
|
/* loaded from: classes.dex */
|
|
final class jo extends GestureDetector.SimpleOnGestureListener implements View.OnTouchListener, xg.a {
|
|
private final a c;
|
|
private final float d;
|
|
private final GestureDetector e;
|
|
private final PointF a = new PointF();
|
|
private final PointF b = new PointF();
|
|
private volatile float f = 3.1415927f;
|
|
|
|
public interface a {
|
|
void a(PointF pointF);
|
|
|
|
boolean onSingleTapUp(MotionEvent motionEvent);
|
|
}
|
|
|
|
@Override // com.applovin.impl.xg.a
|
|
public void a(float[] fArr, float f) {
|
|
this.f = -f;
|
|
}
|
|
|
|
public jo(Context context, a aVar, float f) {
|
|
this.c = aVar;
|
|
this.d = f;
|
|
this.e = new GestureDetector(context, this);
|
|
}
|
|
|
|
@Override // android.view.View.OnTouchListener
|
|
public boolean onTouch(View view, MotionEvent motionEvent) {
|
|
return this.e.onTouchEvent(motionEvent);
|
|
}
|
|
|
|
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
|
|
public boolean onDown(MotionEvent motionEvent) {
|
|
this.a.set(motionEvent.getX(), motionEvent.getY());
|
|
return true;
|
|
}
|
|
|
|
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
|
|
public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
|
|
float x = (motionEvent2.getX() - this.a.x) / this.d;
|
|
float y = motionEvent2.getY();
|
|
PointF pointF = this.a;
|
|
float f3 = (y - pointF.y) / this.d;
|
|
pointF.set(motionEvent2.getX(), motionEvent2.getY());
|
|
double d = this.f;
|
|
float cos = (float) Math.cos(d);
|
|
float sin = (float) Math.sin(d);
|
|
PointF pointF2 = this.b;
|
|
pointF2.x -= (cos * x) - (sin * f3);
|
|
float f4 = pointF2.y + (sin * x) + (cos * f3);
|
|
pointF2.y = f4;
|
|
pointF2.y = Math.max(-45.0f, Math.min(45.0f, f4));
|
|
this.c.a(this.b);
|
|
return true;
|
|
}
|
|
|
|
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
|
|
public boolean onSingleTapUp(MotionEvent motionEvent) {
|
|
return this.c.onSingleTapUp(motionEvent);
|
|
}
|
|
}
|