In commit "
89b810ec Android: Add option LIBUSB_OPTION_WEAK_AUTHORITY
to support used in apk", we should also check weak_authority when
exiting the backend.
[dickens] Fixed whitespace
Closes #842
Signed-off-by: Mark Kuo <starryalley@gmail.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
static void op_exit(struct libusb_context *ctx)
{
UNUSED(ctx);
+
+#ifdef __ANDROID__
+ if (weak_authority) {
+ return;
+ }
+#endif
+
usbi_mutex_static_lock(&linux_hotplug_startstop_lock);
assert(init_count != 0);
if (!--init_count) {
-#define LIBUSB_NANO 11596
+#define LIBUSB_NANO 11597