Fixed bug 4270 - Android HIDDeviceManager function needs to be public
authorSam Lantinga <slouken@libsdl.org>
Tue, 25 Sep 2018 20:11:52 -0700
changeset 1222518445c9fc2f3
parent 12224 0582b4e1fa9f
child 12226 4cbf7e663cb2
Fixed bug 4270 - Android HIDDeviceManager function needs to be public

Sylvain

Can't run an android app without declaring the JNI interface function as public.
android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java	Tue Sep 25 20:08:51 2018 -0700
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java	Tue Sep 25 20:11:52 2018 -0700
     1.3 @@ -504,7 +504,7 @@
     1.4      ////////// JNI interface functions
     1.5      //////////////////////////////////////////////////////////////////////////////////////////////////////
     1.6  
     1.7 -    boolean openDevice(int deviceID) {
     1.8 +    public boolean openDevice(int deviceID) {
     1.9          // Look to see if this is a USB device and we have permission to access it
    1.10          for (HIDDeviceUSB device : mUSBDevices.values()) {
    1.11              if (deviceID == device.getId()) {
    1.12 @@ -539,7 +539,7 @@
    1.13          return false;
    1.14      }
    1.15  
    1.16 -    int sendOutputReport(int deviceID, byte[] report) {
    1.17 +    public int sendOutputReport(int deviceID, byte[] report) {
    1.18          try {
    1.19              Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
    1.20              HIDDevice device;
    1.21 @@ -556,7 +556,7 @@
    1.22          return -1;
    1.23      }
    1.24  
    1.25 -    int sendFeatureReport(int deviceID, byte[] report) {
    1.26 +    public int sendFeatureReport(int deviceID, byte[] report) {
    1.27          try {
    1.28              Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
    1.29              HIDDevice device;
    1.30 @@ -573,7 +573,7 @@
    1.31          return -1;
    1.32      }
    1.33  
    1.34 -    boolean getFeatureReport(int deviceID, byte[] report) {
    1.35 +    public boolean getFeatureReport(int deviceID, byte[] report) {
    1.36          try {
    1.37              Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
    1.38              HIDDevice device;
    1.39 @@ -590,7 +590,7 @@
    1.40          return false;
    1.41      }
    1.42  
    1.43 -    void closeDevice(int deviceID) {
    1.44 +    public void closeDevice(int deviceID) {
    1.45          try {
    1.46              Log.v(TAG, "closeDevice deviceID=" + deviceID);
    1.47              HIDDevice device;