[Commits] SDL: Fixed bug 4270 - Android HIDDeviceManager function needs to...

libsdl.org revision control commits-owner at libsdl.org
Tue Sep 25 20:11:55 PDT 2018


details:   https://hg.libsdl.org/SDL/rev/18445c9fc2f3
changeset: 12225:18445c9fc2f3
user:      Sam Lantinga <slouken at libsdl.org>
date:      Tue Sep 25 20:11:52 2018 -0700
description:
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.

diffstat:

 android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 0582b4e1fa9f -r 18445c9fc2f3 android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
--- a/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java	Tue Sep 25 20:08:51 2018 -0700
+++ b/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java	Tue Sep 25 20:11:52 2018 -0700
@@ -504,7 +504,7 @@
     ////////// JNI interface functions
     //////////////////////////////////////////////////////////////////////////////////////////////////////
 
-    boolean openDevice(int deviceID) {
+    public boolean openDevice(int deviceID) {
         // Look to see if this is a USB device and we have permission to access it
         for (HIDDeviceUSB device : mUSBDevices.values()) {
             if (deviceID == device.getId()) {
@@ -539,7 +539,7 @@
         return false;
     }
 
-    int sendOutputReport(int deviceID, byte[] report) {
+    public int sendOutputReport(int deviceID, byte[] report) {
         try {
             Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
             HIDDevice device;
@@ -556,7 +556,7 @@
         return -1;
     }
 
-    int sendFeatureReport(int deviceID, byte[] report) {
+    public int sendFeatureReport(int deviceID, byte[] report) {
         try {
             Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
             HIDDevice device;
@@ -573,7 +573,7 @@
         return -1;
     }
 
-    boolean getFeatureReport(int deviceID, byte[] report) {
+    public boolean getFeatureReport(int deviceID, byte[] report) {
         try {
             Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
             HIDDevice device;
@@ -590,7 +590,7 @@
         return false;
     }
 
-    void closeDevice(int deviceID) {
+    public void closeDevice(int deviceID) {
         try {
             Log.v(TAG, "closeDevice deviceID=" + deviceID);
             HIDDevice device;


More information about the commits mailing list