Add Discord community version (64-bit only)

- 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
This commit is contained in:
2026-02-18 15:48:36 -08:00
parent c19eb3d7ff
commit c080f0d97f
26930 changed files with 2529574 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
package com.bda.controller;
import android.os.Parcel;
import android.os.Parcelable;
/* loaded from: classes2.dex */
class BaseEvent implements Parcelable {
public static final Parcelable.Creator<BaseEvent> CREATOR = new ParcelableCreator();
public final int mControllerId;
public final long mEventTime;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public int getControllerId() {
return this.mControllerId;
}
public BaseEvent(Parcel parcel) {
this.mEventTime = parcel.readLong();
this.mControllerId = parcel.readInt();
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(this.mEventTime);
parcel.writeInt(this.mControllerId);
}
public static class ParcelableCreator implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public BaseEvent createFromParcel(Parcel parcel) {
return new BaseEvent(parcel);
}
@Override // android.os.Parcelable.Creator
public BaseEvent[] newArray(int i) {
return new BaseEvent[i];
}
}
}

View File

@@ -0,0 +1,268 @@
package com.bda.controller;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import com.bda.controller.IControllerListener;
import com.bda.controller.IControllerMonitor;
import com.bda.controller.IControllerService;
/* loaded from: classes2.dex */
public final class Controller {
public final Context mContext;
public boolean mIsBound = false;
public IControllerService mService = null;
public final IControllerListener.Stub mListenerStub = new IControllerListenerStub();
public final IControllerMonitor.Stub mMonitorStub = new IControllerMonitorStub();
public final ServiceConnection mServiceConnection = new ServiceConnection();
public int mActivityEvent = 6;
public Handler mHandler = null;
public ControllerListener mListener = null;
public void registerMonitor() {
}
public static final Controller getInstance(Context context) {
return new Controller(context);
}
public Controller(Context context) {
this.mContext = context;
}
public final void exit() {
setListener(null, null);
setMonitor(null);
if (this.mIsBound) {
this.mContext.unbindService(this.mServiceConnection);
this.mIsBound = false;
}
}
public final int getState(int i) {
IControllerService iControllerService = this.mService;
if (iControllerService == null) {
return 0;
}
try {
return iControllerService.getState(1, i);
} catch (RemoteException unused) {
return 0;
}
}
public final boolean init() {
if (!this.mIsBound) {
Intent intent = new Intent(IControllerService.class.getName());
this.mContext.startService(intent);
this.mContext.bindService(intent, this.mServiceConnection, 1);
this.mIsBound = true;
}
return this.mIsBound;
}
public final void onPause() {
this.mActivityEvent = 6;
sendMessage(1, 6);
registerListener();
}
public final void onResume() {
this.mActivityEvent = 5;
sendMessage(1, 5);
registerListener();
}
public void registerListener() {
IControllerService iControllerService;
if (this.mListener == null || (iControllerService = this.mService) == null) {
return;
}
try {
try {
iControllerService.registerListener2(this.mListenerStub, this.mActivityEvent);
} catch (RemoteException unused) {
this.mService.registerListener(this.mListenerStub, this.mActivityEvent);
}
} catch (RemoteException unused2) {
}
}
public void sendMessage(int i, int i2) {
IControllerService iControllerService = this.mService;
if (iControllerService != null) {
try {
iControllerService.sendMessage(i, i2);
} catch (RemoteException unused) {
}
}
}
public final void setListener(ControllerListener controllerListener, Handler handler) {
unregisterListener();
this.mListener = controllerListener;
this.mHandler = handler;
registerListener();
}
public final void setMonitor(ControllerMonitor controllerMonitor) {
unregisterMonitor();
registerMonitor();
}
public void unregisterListener() {
IControllerService iControllerService = this.mService;
if (iControllerService != null) {
try {
iControllerService.unregisterListener(this.mListenerStub, this.mActivityEvent);
} catch (RemoteException unused) {
}
}
}
public void unregisterMonitor() {
IControllerService iControllerService = this.mService;
if (iControllerService != null) {
try {
iControllerService.unregisterMonitor(this.mMonitorStub, this.mActivityEvent);
} catch (RemoteException unused) {
}
}
}
public class IControllerListenerStub extends IControllerListener.Stub {
public IControllerListenerStub() {
}
@Override // com.bda.controller.IControllerListener
public void onKeyEvent(KeyEvent keyEvent) {
if (keyEvent.getControllerId() == 1) {
Controller controller = Controller.this;
if (controller.mListener != null) {
KeyRunnable keyRunnable = controller.new KeyRunnable(keyEvent);
Handler handler = Controller.this.mHandler;
if (handler != null) {
handler.post(keyRunnable);
} else {
keyRunnable.run();
}
}
}
}
@Override // com.bda.controller.IControllerListener
public void onMotionEvent(MotionEvent motionEvent) {
if (motionEvent.getControllerId() == 1) {
Controller controller = Controller.this;
if (controller.mListener != null) {
MotionRunnable motionRunnable = controller.new MotionRunnable(motionEvent);
Handler handler = Controller.this.mHandler;
if (handler != null) {
handler.post(motionRunnable);
} else {
motionRunnable.run();
}
}
}
}
@Override // com.bda.controller.IControllerListener
public void onStateEvent(StateEvent stateEvent) {
if (stateEvent.getControllerId() == 1) {
Controller controller = Controller.this;
if (controller.mListener != null) {
StateRunnable stateRunnable = controller.new StateRunnable(stateEvent);
Handler handler = Controller.this.mHandler;
if (handler != null) {
handler.post(stateRunnable);
} else {
stateRunnable.run();
}
}
}
}
}
public class IControllerMonitorStub extends IControllerMonitor.Stub {
public IControllerMonitorStub() {
}
@Override // com.bda.controller.IControllerMonitor
public void onLog(int i, int i2, String str) {
Controller.this.getClass();
}
}
public class KeyRunnable implements Runnable {
public final KeyEvent mEvent;
public KeyRunnable(KeyEvent keyEvent) {
this.mEvent = keyEvent;
}
@Override // java.lang.Runnable
public void run() {
ControllerListener controllerListener = Controller.this.mListener;
if (controllerListener != null) {
controllerListener.onKeyEvent(this.mEvent);
}
}
}
public class MotionRunnable implements Runnable {
public final MotionEvent mEvent;
public MotionRunnable(MotionEvent motionEvent) {
this.mEvent = motionEvent;
}
@Override // java.lang.Runnable
public void run() {
ControllerListener controllerListener = Controller.this.mListener;
if (controllerListener != null) {
controllerListener.onMotionEvent(this.mEvent);
}
}
}
public class ServiceConnection implements android.content.ServiceConnection {
public ServiceConnection() {
}
@Override // android.content.ServiceConnection
public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
Controller.this.mService = IControllerService.Stub.asInterface(iBinder);
Controller.this.registerListener();
Controller.this.registerMonitor();
Controller controller = Controller.this;
if (controller.mActivityEvent == 5) {
controller.sendMessage(1, 5);
Controller.this.sendMessage(1, 7);
}
}
@Override // android.content.ServiceConnection
public final void onServiceDisconnected(ComponentName componentName) {
Controller.this.mService = null;
}
}
public class StateRunnable implements Runnable {
public final StateEvent mEvent;
public StateRunnable(StateEvent stateEvent) {
this.mEvent = stateEvent;
}
@Override // java.lang.Runnable
public void run() {
ControllerListener controllerListener = Controller.this.mListener;
if (controllerListener != null) {
controllerListener.onStateEvent(this.mEvent);
}
}
}
}

View File

@@ -0,0 +1,10 @@
package com.bda.controller;
/* loaded from: classes2.dex */
public interface ControllerListener {
void onKeyEvent(KeyEvent keyEvent);
void onMotionEvent(MotionEvent motionEvent);
void onStateEvent(StateEvent stateEvent);
}

View File

@@ -0,0 +1,5 @@
package com.bda.controller;
/* loaded from: classes2.dex */
public interface ControllerMonitor {
}

View File

@@ -0,0 +1,53 @@
package com.bda.controller;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
/* loaded from: classes2.dex */
public interface IControllerListener extends IInterface {
void onKeyEvent(KeyEvent keyEvent);
void onMotionEvent(MotionEvent motionEvent);
void onStateEvent(StateEvent stateEvent);
public static abstract class Stub extends Binder implements IControllerListener {
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, "com.bda.controller.IControllerListener");
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) {
if (i == 1) {
parcel.enforceInterface("com.bda.controller.IControllerListener");
onKeyEvent(parcel.readInt() != 0 ? KeyEvent.CREATOR.createFromParcel(parcel) : null);
parcel2.writeNoException();
return true;
}
if (i == 2) {
parcel.enforceInterface("com.bda.controller.IControllerListener");
onMotionEvent(parcel.readInt() != 0 ? MotionEvent.CREATOR.createFromParcel(parcel) : null);
parcel2.writeNoException();
return true;
}
if (i != 3) {
if (i == 1598968902) {
parcel2.writeString("com.bda.controller.IControllerListener");
return true;
}
return super.onTransact(i, parcel, parcel2, i2);
}
parcel.enforceInterface("com.bda.controller.IControllerListener");
onStateEvent(parcel.readInt() != 0 ? StateEvent.CREATOR.createFromParcel(parcel) : null);
parcel2.writeNoException();
return true;
}
}
}

View File

@@ -0,0 +1,37 @@
package com.bda.controller;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
/* loaded from: classes2.dex */
public interface IControllerMonitor extends IInterface {
void onLog(int i, int i2, String str);
public static abstract class Stub extends Binder implements IControllerMonitor {
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public Stub() {
attachInterface(this, "com.bda.controller.IControllerMonitor");
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) {
if (i != 1) {
if (i == 1598968902) {
parcel2.writeString("com.bda.controller.IControllerMonitor");
return true;
}
return super.onTransact(i, parcel, parcel2, i2);
}
parcel.enforceInterface("com.bda.controller.IControllerMonitor");
onLog(parcel.readInt(), parcel.readInt(), parcel.readString());
parcel2.writeNoException();
return true;
}
}
}

View File

@@ -0,0 +1,156 @@
package com.bda.controller;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
/* loaded from: classes2.dex */
public interface IControllerService extends IInterface {
int getState(int i, int i2);
void registerListener(IControllerListener iControllerListener, int i);
void registerListener2(IControllerListener iControllerListener, int i);
void sendMessage(int i, int i2);
void unregisterListener(IControllerListener iControllerListener, int i);
void unregisterMonitor(IControllerMonitor iControllerMonitor, int i);
public static abstract class Stub extends Binder implements IControllerService {
public static IControllerService asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.bda.controller.IControllerService");
if (queryLocalInterface != null && (queryLocalInterface instanceof IControllerService)) {
return (IControllerService) queryLocalInterface;
}
return new Proxy(iBinder);
}
public static class Proxy implements IControllerService {
public IBinder mRemote;
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // com.bda.controller.IControllerService
public void registerListener(IControllerListener iControllerListener, int i) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.bda.controller.IControllerService");
obtain.writeStrongBinder(iControllerListener != null ? iControllerListener.asBinder() : null);
obtain.writeInt(i);
this.mRemote.transact(1, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
} catch (Throwable th) {
obtain2.recycle();
obtain.recycle();
throw th;
}
}
@Override // com.bda.controller.IControllerService
public void unregisterListener(IControllerListener iControllerListener, int i) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.bda.controller.IControllerService");
obtain.writeStrongBinder(iControllerListener != null ? iControllerListener.asBinder() : null);
obtain.writeInt(i);
this.mRemote.transact(2, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
} catch (Throwable th) {
obtain2.recycle();
obtain.recycle();
throw th;
}
}
@Override // com.bda.controller.IControllerService
public void unregisterMonitor(IControllerMonitor iControllerMonitor, int i) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.bda.controller.IControllerService");
obtain.writeStrongBinder(iControllerMonitor != null ? iControllerMonitor.asBinder() : null);
obtain.writeInt(i);
this.mRemote.transact(4, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
} catch (Throwable th) {
obtain2.recycle();
obtain.recycle();
throw th;
}
}
@Override // com.bda.controller.IControllerService
public int getState(int i, int i2) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.bda.controller.IControllerService");
obtain.writeInt(i);
obtain.writeInt(i2);
this.mRemote.transact(8, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readInt();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // com.bda.controller.IControllerService
public void sendMessage(int i, int i2) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.bda.controller.IControllerService");
obtain.writeInt(i);
obtain.writeInt(i2);
this.mRemote.transact(9, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // com.bda.controller.IControllerService
public void registerListener2(IControllerListener iControllerListener, int i) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.bda.controller.IControllerService");
obtain.writeStrongBinder(iControllerListener != null ? iControllerListener.asBinder() : null);
obtain.writeInt(i);
this.mRemote.transact(10, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
} catch (Throwable th) {
obtain2.recycle();
obtain.recycle();
throw th;
}
}
}
}
}

View File

@@ -0,0 +1,54 @@
package com.bda.controller;
import android.os.Parcel;
import android.os.Parcelable;
/* loaded from: classes2.dex */
public final class KeyEvent extends BaseEvent implements Parcelable {
public static final Parcelable.Creator<KeyEvent> CREATOR = new ParcelableCreator();
public final int mAction;
public final int mKeyCode;
@Override // com.bda.controller.BaseEvent, android.os.Parcelable
public int describeContents() {
return 0;
}
public final int getAction() {
return this.mAction;
}
@Override // com.bda.controller.BaseEvent
public /* bridge */ /* synthetic */ int getControllerId() {
return super.getControllerId();
}
public final int getKeyCode() {
return this.mKeyCode;
}
public KeyEvent(Parcel parcel) {
super(parcel);
this.mKeyCode = parcel.readInt();
this.mAction = parcel.readInt();
}
@Override // com.bda.controller.BaseEvent, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeInt(this.mKeyCode);
parcel.writeInt(this.mAction);
}
public static class ParcelableCreator implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public KeyEvent createFromParcel(Parcel parcel) {
return new KeyEvent(parcel);
}
@Override // android.os.Parcelable.Creator
public KeyEvent[] newArray(int i) {
return new KeyEvent[i];
}
}
}

View File

@@ -0,0 +1,75 @@
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];
}
}
}

View File

@@ -0,0 +1,54 @@
package com.bda.controller;
import android.os.Parcel;
import android.os.Parcelable;
/* loaded from: classes2.dex */
public class StateEvent extends BaseEvent implements Parcelable {
public static final Parcelable.Creator<StateEvent> CREATOR = new ParcelableCreator();
public final int mAction;
public final int mState;
@Override // com.bda.controller.BaseEvent, android.os.Parcelable
public int describeContents() {
return 0;
}
public final int getAction() {
return this.mAction;
}
@Override // com.bda.controller.BaseEvent
public /* bridge */ /* synthetic */ int getControllerId() {
return super.getControllerId();
}
public final int getState() {
return this.mState;
}
public StateEvent(Parcel parcel) {
super(parcel);
this.mState = parcel.readInt();
this.mAction = parcel.readInt();
}
@Override // com.bda.controller.BaseEvent, android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
super.writeToParcel(parcel, i);
parcel.writeInt(this.mState);
parcel.writeInt(this.mAction);
}
public static class ParcelableCreator implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public StateEvent createFromParcel(Parcel parcel) {
return new StateEvent(parcel);
}
@Override // android.os.Parcelable.Creator
public StateEvent[] newArray(int i) {
return new StateEvent[i];
}
}
}