mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
android/usb: pass the usbDevice for intent handling
Instead of creating a string with all the object information, simply pass the actual object to the C++ code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c19e3bd5ba
commit
b0eccec8ed
2 changed files with 13 additions and 8 deletions
|
@ -27,7 +27,7 @@ public class SubsurfaceMobileActivity extends QtActivity
|
|||
public static boolean isIntentPending;
|
||||
public static boolean isInitialized;
|
||||
private static final String TAG = "subsurfacedivelog.mobile";
|
||||
public static native void setDeviceString(String deviceString);
|
||||
public static native void setUsbDevice(UsbDevice usbDevice);
|
||||
private static Context appContext;
|
||||
|
||||
// we need to provide two endpoints:
|
||||
|
@ -105,7 +105,7 @@ public class SubsurfaceMobileActivity extends QtActivity
|
|||
return;
|
||||
}
|
||||
Log.i(TAG + " processIntent device name", device.getDeviceName());
|
||||
setDeviceString(device.toString());
|
||||
setUsbDevice(device);
|
||||
} // processIntent
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue