- 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
76 lines
2.5 KiB
Java
76 lines
2.5 KiB
Java
package com.bda.controller;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import android.util.SparseArray;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class MotionEvent extends BaseEvent implements Parcelable {
|
|
public static final Parcelable.Creator<MotionEvent> CREATOR = new ParcelableCreator();
|
|
public final SparseArray mAxis;
|
|
public final SparseArray mPrecision;
|
|
|
|
@Override // com.bda.controller.BaseEvent, android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
@Override // com.bda.controller.BaseEvent
|
|
public /* bridge */ /* synthetic */ int getControllerId() {
|
|
return super.getControllerId();
|
|
}
|
|
|
|
public MotionEvent(Parcel parcel) {
|
|
super(parcel);
|
|
int readInt = parcel.readInt();
|
|
this.mAxis = new SparseArray(readInt);
|
|
for (int i = 0; i < readInt; i++) {
|
|
this.mAxis.put(parcel.readInt(), Float.valueOf(parcel.readFloat()));
|
|
}
|
|
this.mPrecision = new SparseArray(parcel.readInt());
|
|
for (int i2 = 0; i2 < readInt; i2++) {
|
|
this.mPrecision.put(parcel.readInt(), Float.valueOf(parcel.readFloat()));
|
|
}
|
|
}
|
|
|
|
public final float getAxisValue(int i) {
|
|
return getAxisValue(i, 0);
|
|
}
|
|
|
|
public final float getAxisValue(int i, int i2) {
|
|
if (i2 == 0) {
|
|
return ((Float) this.mAxis.get(i, Float.valueOf(0.0f))).floatValue();
|
|
}
|
|
return 0.0f;
|
|
}
|
|
|
|
@Override // com.bda.controller.BaseEvent, android.os.Parcelable
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
super.writeToParcel(parcel, i);
|
|
int size = this.mAxis.size();
|
|
parcel.writeInt(size);
|
|
for (int i2 = 0; i2 < size; i2++) {
|
|
parcel.writeInt(this.mAxis.keyAt(i2));
|
|
parcel.writeFloat(((Float) this.mAxis.valueAt(i2)).floatValue());
|
|
}
|
|
int size2 = this.mPrecision.size();
|
|
parcel.writeInt(size2);
|
|
for (int i3 = 0; i3 < size2; i3++) {
|
|
parcel.writeInt(this.mPrecision.keyAt(i3));
|
|
parcel.writeFloat(((Float) this.mPrecision.valueAt(i3)).floatValue());
|
|
}
|
|
}
|
|
|
|
public static class ParcelableCreator implements Parcelable.Creator {
|
|
@Override // android.os.Parcelable.Creator
|
|
public MotionEvent createFromParcel(Parcel parcel) {
|
|
return new MotionEvent(parcel);
|
|
}
|
|
|
|
@Override // android.os.Parcelable.Creator
|
|
public MotionEvent[] newArray(int i) {
|
|
return new MotionEvent[i];
|
|
}
|
|
}
|
|
}
|