From b0eccec8ed330d000e88b01404a30cc610d93ee2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Mar 2020 17:57:36 -0700 Subject: 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 --- .../src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java') diff --git a/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java b/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java index 52f401b71..c50dfb237 100644 --- a/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java +++ b/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java @@ -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 -- cgit v1.2.3-70-g09d2