XBMC close after removing wireless keyboard/mouse adapeter
#1
Hello,
I observe one issue in XBMC. If we launch XBMC and connect or disconnect wireless keyboard/mouse adapter then XBMC gets close. In logcat I observe that after removing adapter onPause method gets called.
I didn't observe this issue with USB pendrive. Below is the logcat

D/Vold ( 137): Volume usbdrive state changing 4 (Mounted) -> 5 (Unmounting)
D/MountService( 651): volume state changed for /mnt/usbdrive (mounted -> unmounted)
D/MountService( 651): volume state changed for /mnt/usbdrive (unmounted -> bad_removal)
D/MountService( 651): sendStorageIntent Intent { act=android.intent.action.MEDIA_BAD_REMOVAL dat=file:///mnt/usbdrive (has extras) } to UserHandle{-1}
D/MountService( 651): sendStorageIntent Intent { act=android.intent.action.MEDIA_EJECT dat=file:///mnt/usbdrive (has extras) } to UserHandle{-1}
I/ActivityManager( 651): Start proc com.estrongs.android.pop for broadcast com.estrongs.android.pop/.EnableOEMConfig: pid=3892 uid=10050 gids={50050, 3003, 3002, 3001, 1015, 1028}
E/ObjectHelper( 3892): Can't find methodConfusedetCompatibilityInfo
D/dalvikvm( 3892): GC_CONCURRENT freed 254K, 14% free 2563K/2948K, paused 2ms+5ms, total 17ms
I/Vold ( 137): /mnt/secure/asec sucessfully unmounted
I/Vold ( 137): /mnt/usbdrive/.android_secure sucessfully unmounted
I/Vold ( 137): /mnt/usbdrive sucessfully unmounted
I/Vold ( 137): /mnt/usbdrive unmounted sucessfully
D/Vold ( 137): Volume usbdrive state changing 5 (Unmounting) -> 1 (Idle-Unmounted)
D/DirectVolume( 137): Crisis averted
D/DirectVolume( 137): Volume usbdrive /mnt/usbdrive disk 8:0 removed
D/Vold ( 137): Volume usbdrive state changing 1 (Idle-Unmounted) -> 0 (No-Media)
D/WifiMonitor( 651): Event [CTRL-EVENT-STATE-CHANGE id=1 state=8 BSSID=00:25:9c:0c:77:9d SSID=SPECTRUM-GREEN]
I/wpa_supplicant( 757): wlan0: WPA: Group rekeying completed with 00:25:9c:0c:77:9d [GTK=TKIP]
D/WifiMonitor( 651): Event [WPA: Group rekeying completed with 00:25:9c:0c:77:9d [GTK=TKIP]]
D/WifiMonitor( 651): Event [CTRL-EVENT-STATE-CHANGE id=1 state=9 BSSID=00:25:9c:0c:77:9d SSID=SPECTRUM-GREEN]
I/EventHub( 651): Removing device Logitech Unifying Device. Wireless PID:4024 due to epoll hang-up event.
I/EventHub( 651): Removed device: path=/dev/input/event1 name=Logitech Unifying Device. Wireless PID:4024 id=3 fd=203 classes=0x8000016b
I/EventHub( 651): Removing device '/dev/input/event1' due to inotify event
I/InputReader( 651): Device removed: id=3, name='Logitech Unifying Device. Wireless PID:4024', sources=0x01002713
I/ActivityManager( 651): Config changes=1470 {1.0 ?mcc?mnc en_US ldltr sw540dp w961dp h467dp 213dpi lrg long land television -touch -keyb/v/h -nav/h s.10}
I/threaded_app( 3551): Pause: 0x710c1948
I/threaded_app( 3551): activityState=13
V/XBMC ( 3551): virtual void CXBMCApp::onPause(): 2
V/XBMC ( 3551): virtual void CXBMCApp::onDeactivate(): 2
I/threaded_app( 3551): SaveInstanceState: 0x710c1948
V/XBMC ( 3551): virtual void CXBMCApp::onSaveState(void**, size_t*): 2
I/threaded_app( 3551): APP_CMD_SAVE_STATE
I/threaded_app( 3551): Stop: 0x710c1948
I/threaded_app( 3551): activityState=14
V/XBMC ( 3551): virtual void CXBMCApp::onStop(): 2
I/threaded_app( 3551): NativeWindowDestroyed: 0x710c1948 -- 0x71096248
I/threaded_app( 3551): APP_CMD_TERM_WINDOW
V/XBMC ( 3551): virtual void CXBMCApp::onDestroyWindow(): 2
V/XBMC ( 3551): XBMC_DestroyDisplay()
V/XBMC ( 3551): bool CXBMCApp::getWakeLock(JNIEnv*)
I/threaded_app( 3551): APP_CMD_TERM_WINDOW


Please help me to solve this error.
Thank You
Reply
#2
Is this on Gotham? Supposed to be fixed, there...

At first sight, the problems is that the USB subsystem resets, which removes the Logitech unifying dongle from the system, and thus the kbd / mouse.
By default, Android does a pause of the active apps, then, which eventually closes xbmc on frodo.
Reply
#3
The problem is that XBMC not handle well the hardware configuration changes and restart activity. This simple line in XBMC AndroidManifest.xml solve:

android:configChanges="orientation|screenSize|keyboard|keyboardHidden|touchscreen"

http://developer.android.com/guide/topic...anges.html
Reply
#4
And we have
Code:
android:configChanges="orientation|keyboard|keyboardHidden|navigation|touchscreen"

What is your point?
Reply
#5
Update: OK, I've seen has been added but only in part:

in the main activity touchscreen is missing

<activity
android:name=".Main"
android:configChanges="orientation|keyboard|keyboardHidden|navigation"

this can create restart activity when users connect / disconnect remote control app that simulate also touchscreen. example DroidMote or an hardware keyboard with a touchpad

https://github.com/xbmc/xbmc/blob/master...est.xml.in
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC close after removing wireless keyboard/mouse adapeter0