Kegbot / kegbot-android

Android beer kegerator frontend and controller app. Works with a Kegbot server to make your kegerator awesome.
http://kegbot.org/docs/android/
GNU General Public License v2.0
42 stars 53 forks source link

Warn on USB Permission issue #51

Open mik3y opened 11 years ago

mik3y commented 11 years ago

Deal with the following class of exception by showing an alert:

07-26 13:26:11.375 E/UsbManager( 5769): exception in UsbManager.openDevice
07-26 13:26:11.375 E/UsbManager( 5769): java.lang.SecurityException: User has not given permission to device UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=9025,mProductId=67,mClass=2,mSubclass=0,mProtocol=0,mInterfaces=[Landroid.hardware.usb.UsbInterface;@41b1a0b0]
07-26 13:26:11.375 E/UsbManager( 5769):     at android.os.Parcel.readException(Parcel.java:1425)
07-26 13:26:11.375 E/UsbManager( 5769):     at android.os.Parcel.readException(Parcel.java:1379)
07-26 13:26:11.375 E/UsbManager( 5769):     at android.hardware.usb.IUsbManager$Stub$Proxy.openDevice(IUsbManager.java:366)
07-26 13:26:11.375 E/UsbManager( 5769):     at android.hardware.usb.UsbManager.openDevice(UsbManager.java:265)
07-26 13:26:11.375 E/UsbManager( 5769):     at com.hoho.android.usbserial.driver.UsbSerialProber$2.getDevice(UsbSerialProber.java:64)
07-26 13:26:11.375 E/UsbManager( 5769):     at com.hoho.android.usbserial.driver.UsbSerialProber.acquire(UsbSerialProber.java:115)
07-26 13:26:11.375 E/UsbManager( 5769):     at com.hoho.android.usbserial.driver.UsbSerialProber.acquire(UsbSerialProber.java:95)
07-26 13:26:11.375 E/UsbManager( 5769):     at org.kegbot.core.KegboardManager.acquireSerialDevice(KegboardManager.java:255)
07-26 13:26:11.375 E/UsbManager( 5769):     at org.kegbot.core.KegboardManager.runInBackground(KegboardManager.java:212)
07-26 13:26:11.375 E/UsbManager( 5769):     at org.kegbot.core.BackgroundManager$1.run(BackgroundManager.java:38)
07-26 13:26:11.375 E/UsbManager( 5769):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
07-26 13:26:11.375 E/UsbManager( 5769):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
07-26 13:26:11.375 E/UsbManager( 5769):     at java.lang.Thread.run(Thread.java:856)
patfreeman commented 4 years ago

related: black picture for lack of camera perms.