mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-21 17:37:32 +01:00
android: let's implement proguard rules for SDL2
This commit is contained in:
parent
1acda22ad4
commit
778315da5f
102
android/app/proguard-rules.pro
vendored
102
android/app/proguard-rules.pro
vendored
@ -1,15 +1,89 @@
|
|||||||
# SDL2 branch (unlike SDL3) doesn't have proguard file
|
-keep class su.xash.engine.XashActivity {
|
||||||
# As SDL3 migration is planned, which we can easily do it on platforms
|
java.lang.String loadAndroidID();
|
||||||
# unsupported by GoldSrc by the way, just prevent whole org.libsdl.app
|
java.lang.String getAndroidID();
|
||||||
# namespace from proguard optimization
|
void saveAndroidID(java.lang.String);
|
||||||
-keep public class org.libsdl.app.* { public static *; }
|
java.lang.String getCallingPackage();
|
||||||
|
java.lang.String[] getAssetsList(boolean, java.lang.String);
|
||||||
-keep,includedescriptorclasses,allowoptimization class su.xash.engine.XashActivity
|
android.content.res.AssetManager getAssets(boolean);
|
||||||
{
|
}
|
||||||
java.lang.String loadAndroidID();
|
|
||||||
java.lang.String getAndroidID();
|
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLInputConnection {
|
||||||
void saveAndroidID(java.lang.String);
|
void nativeCommitText(java.lang.String, int);
|
||||||
java.lang.String getCallingPackage();
|
void nativeGenerateScancodeForUnichar(char);
|
||||||
java.lang.String[] getAssetsList(boolean, java.lang.String);
|
}
|
||||||
android.content.res.AssetManager getAssets(boolean);
|
|
||||||
|
-keep,includedescriptorclasses class org.libsdl.app.SDLActivity {
|
||||||
|
# for some reason these aren't compatible with allowoptimization modifier
|
||||||
|
boolean supportsRelativeMouse();
|
||||||
|
void setWindowStyle(boolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLActivity {
|
||||||
|
java.lang.String nativeGetHint(java.lang.String); # Java-side doesn't use this, so it gets minified, but C-side still tries to register it
|
||||||
|
boolean onNativeSoftReturnKey();
|
||||||
|
void onNativeKeyboardFocusLost();
|
||||||
|
boolean isScreenKeyboardShown();
|
||||||
|
android.util.DisplayMetrics getDisplayDPI();
|
||||||
|
java.lang.String clipboardGetText();
|
||||||
|
boolean clipboardHasText();
|
||||||
|
void clipboardSetText(java.lang.String);
|
||||||
|
int createCustomCursor(int[], int, int, int, int);
|
||||||
|
void destroyCustomCursor(int);
|
||||||
|
android.content.Context getContext();
|
||||||
|
boolean getManifestEnvironmentVariables();
|
||||||
|
android.view.Surface getNativeSurface();
|
||||||
|
void initTouch();
|
||||||
|
boolean isAndroidTV();
|
||||||
|
boolean isChromebook();
|
||||||
|
boolean isDeXMode();
|
||||||
|
boolean isTablet();
|
||||||
|
void manualBackButton();
|
||||||
|
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
|
||||||
|
void minimizeWindow();
|
||||||
|
int openURL(java.lang.String);
|
||||||
|
void requestPermission(java.lang.String, int);
|
||||||
|
int showToast(java.lang.String, int, int, int, int);
|
||||||
|
boolean sendMessage(int, int);
|
||||||
|
boolean setActivityTitle(java.lang.String);
|
||||||
|
boolean setCustomCursor(int);
|
||||||
|
void setOrientation(int, int, boolean, java.lang.String);
|
||||||
|
boolean setRelativeMouseEnabled(boolean);
|
||||||
|
boolean setSystemCursor(int);
|
||||||
|
boolean shouldMinimizeOnFocusLoss();
|
||||||
|
boolean showTextInput(int, int, int, int);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager {
|
||||||
|
boolean initialize(boolean, boolean);
|
||||||
|
boolean openDevice(int);
|
||||||
|
int sendOutputReport(int, byte[]);
|
||||||
|
int sendFeatureReport(int, byte[]);
|
||||||
|
boolean getFeatureReport(int, byte[]);
|
||||||
|
void closeDevice(int);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLAudioManager {
|
||||||
|
int[] getAudioOutputDevices();
|
||||||
|
int[] getAudioInputDevices();
|
||||||
|
int[] audioOpen(int, int, int, int, int);
|
||||||
|
void audioWriteFloatBuffer(float[]);
|
||||||
|
void audioWriteShortBuffer(short[]);
|
||||||
|
void audioWriteByteBuffer(byte[]);
|
||||||
|
void audioClose();
|
||||||
|
int[] captureOpen(int, int, int, int, int);
|
||||||
|
int captureReadFloatBuffer(float[], boolean);
|
||||||
|
int captureReadShortBuffer(short[], boolean);
|
||||||
|
int captureReadByteBuffer(byte[], boolean);
|
||||||
|
void captureClose();
|
||||||
|
void audioSetThreadPriority(boolean, int);
|
||||||
|
native int nativeSetupJNI();
|
||||||
|
native void removeAudioDevice(boolean, int);
|
||||||
|
native void addAudioDevice(boolean, int);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
|
||||||
|
void pollInputDevices();
|
||||||
|
void pollHapticDevices();
|
||||||
|
void hapticRun(int, float, int);
|
||||||
|
void hapticStop(int);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user