10.07.2015 Views

dissertation

dissertation

dissertation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

96+ /∗∗+ ∗ The p r o v i d e r that s t a r t e d us .+ ∗/+ p r i v a t e ContactsProvider2 p r o v i d e r = n u l l ;++ /∗∗+ ∗ @param parent+ ∗ The p r o v i d e r that s t a r t e d us and w i l l get n o t i f i c a t i o n s .+ ∗/+ p u b l i c USBBroadcastReceiver ( ContactsProvider2 parent ) {+ p r o v i d e r = parent ;+ }++ /∗+ ∗ ( non−Javadoc )+ ∗+ ∗ @see android . content . BroadcastReceiver#onReceive ( android . content . Context ,+ ∗ android . content . I n t e n t )+ ∗/+ @Override+ p u b l i c void onReceive ( Context context , I n t e n t i n t e n t ) {+ // This i s the CyanogenMod 7 . 1 UsbManager , not the one from s t o c k+ // Android 2 . 3 or the backported Google API : s .+ Bundle e x t r a s = i n t e n t . g e t E x t r a s ( ) ;+ boolean usbConnected = e x t r a s . getBoolean ( UsbManager .USB CONNECTED) ;+ boolean adbEnabled = e x t r a s . g e t S t r i n g ( UsbManager .USB FUNCTION ADB)+ . e q u a l s ( UsbManager .USB FUNCTION ENABLED ) ;+ p r o v i d e r . onUSBDebug( usbConnected && adbEnabled ) ;+ }+ }++ p r i v a t e boolean isDebugging ;++ p r i v a t e void onUSBDebug( boolean a c t i v e ) {+ isDebugging = a c t i v e ;+ }++ p r i v a t e B roadcastReceiver r e c e i v e r = n u l l ;+ p r i v a t e I n t e n t F i l t e r f i l t e r = n u l l ;+

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!