Added JNI native methods to proguard-rules.pro (thanks @AntTheAlchemist!)

Fixes https://github.com/libsdl-org/SDL/issues/3563
main
Sam Lantinga 2024-02-25 08:40:47 -08:00
parent b8a52c1237
commit 1cae52bbac
1 changed files with 68 additions and 0 deletions

View File

@ -15,3 +15,71 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *; # public *;
#} #}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLActivity {
void manualBackButton();
boolean setActivityTitle(java.lang.String);
void setWindowStyle(boolean);
void setOrientation(int, int, boolean, java.lang.String);
void minimizeWindow();
boolean shouldMinimizeOnFocusLoss();
boolean isScreenKeyboardShown();
boolean supportsRelativeMouse();
boolean setRelativeMouseEnabled(boolean);
boolean sendMessage(int, int);
android.content.Context getContext();
boolean isAndroidTV();
boolean isTablet();
boolean isChromebook();
boolean isDeXMode();
boolean getManifestEnvironmentVariables();
boolean showTextInput(int, int, int, int);
android.view.Surface getNativeSurface();
void initTouch();
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
boolean clipboardHasText();
java.lang.String clipboardGetText();
void clipboardSetText(java.lang.String);
int createCustomCursor(int[], int, int, int, int);
void destroyCustomCursor(int);
boolean setCustomCursor(int);
boolean setSystemCursor(int);
void requestPermission(java.lang.String, int);
int openURL(java.lang.String);
int showToast(java.lang.String, int, int, int, int);
native java.lang.String nativeGetHint(java.lang.String);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager {
boolean initialize(boolean, boolean);
boolean openDevice(int);
int writeReport(int, byte[], boolean);
boolean readReport(int, byte[], boolean);
void closeDevice(int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLAudioManager {
void registerAudioDeviceCallback();
void unregisterAudioDeviceCallback();
int[] audioOpen(int, int, int, int, int);
void audioWriteFloatBuffer(float[]);
void audioWriteShortBuffer(short[]);
void audioWriteByteBuffer(byte[]);
int[] captureOpen(int, int, int, int, int);
int captureReadFloatBuffer(float[], boolean);
int captureReadShortBuffer(short[], boolean);
int captureReadByteBuffer(byte[], boolean);
void audioClose();
void captureClose();
void audioSetThreadPriority(boolean, int);
int nativeSetupJNI();
void removeAudioDevice(boolean, int);
void addAudioDevice(boolean, java.lang.String, int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
void pollInputDevices();
void pollHapticDevices();
void hapticRun(int, float, int);
void hapticStop(int);
}