打印
[i.MX]

插拔usb mouse时,Android Activity会再次重载

[复制链接]
2588|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
nym521|  楼主 | 2016-8-10 18:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 nym521 于 2016-8-11 09:41 编辑

在imx6DL上成功移植Android4.3系统后,在其上面开发Android APP。
发现在插拔usb 鼠标时,Activity会重新加载,即会执行onPause ——> onStop ——> onCreate ——>onResume
同时还有以下错误提示:
[ScreenshotSurface] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
换成其他的U盘,没有出现这种现象。

具体log如下:
拔下鼠标:
usb 2-1.2: USB disconnect, device number 10
I/EventHub( 2510): Removing device '/dev/input/mouse0' due to inotify event
I/EventHub( 2510): Removing device '/dev/input/event0' due to inotify event
I/EventHub( 2510): Removed device: path=/dev/input/event0 name=Microsoft Comfort Mouse 3000 id=6 fd=166 classes=0x80000169
I/InputReader( 2510): Device removed: id=6, name='Microsoft Comfort Mouse 3000', sources=0x01002713
I/ActivityManager( 2510): Config changes=1460 {1.0 ?mcc?mnc zh_CN ldltr sw1080dp w1920dp h1007dp 160dpi xlrg long land -touch -keyb/v/h -nav/h s.17}
E/BufferQueue( 2213): [ScreenshotSurface] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
E/MainActivity( 3599): onPause
E/MainActivity( 3599): onStop
E/MainActivity( 3599): onCreate
D/PhoneStatusBar( 2583): mSettingsPanelGravity = 8388661
E/MainActivity( 3599): onResume
E/BufferQueue( 2213): [com.example.test/com.example.test.MainActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
I/WindowManager( 2510): Screen frozen for +335ms due to Window{41babda8 u0 com.example.test/com.example.test.MainActivity}
D/dalvikvm( 2510): GC_EXPLICIT freed 127K, 17% free 5567K/6664K, paused 4ms+4ms, total 62ms

插入鼠标:
usb 2-1.2: new low speed USB device number 11 using fsl-ehci
input: Microsoft Comfort Mouse 3000 as /devices/platform/fsl-ehci.1/usb2/2-1/2-1.2/2-1.2:1.0/input/input6
keychord: using input dev Microsoft Comfort Mouse 3000 for fevent
generic-usb 0003:045E:077B.0007: input,hidraw0: USB HID v1.11 Mouse [Microsoft Comfort Mouse 3000] on usb-fsl-ehci.1-1.2/input0
E/EventHub( 2510): could not get driver version for /dev/input/mouse0, Not a typewriter
D/EventHub( 2510): No input device configuration file found for device 'Microsoft Comfort Mouse 3000'.
W/EventHub( 2510): Unable to disable kernel key repeat for /dev/input/event0: Function not implemented
I/EventHub( 2510): New device: id=7, fd=173, path='/dev/input/event0', name='Microsoft Comfort Mouse 3000', classes=0x80000169, configuration='',
keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true,
usingClockIoctl=false
I/InputReader( 2510): Device added: id=7, name='Microsoft Comfort Mouse 3000', sources=0x01002713
I/ActivityManager( 2510): Config changes=1460 {1.0 ?mcc?mnc zh_CN ldltr sw1080dp w1920dp h1007dp 160dpi xlrg long land -touch -keyb/v/h dpad/v s.18}
E/BufferQueue( 2213): [ScreenshotSurface] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
E/MainActivity( 3599): onPause
E/MainActivity( 3599): onStop
E/MainActivity( 3599): onCreate
D/PhoneStatusBar( 2583): mSettingsPanelGravity = 8388661
E/MainActivity( 3599): onResume
E/BufferQueue( 2213): [com.example.test/com.example.test.MainActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
I/WindowManager( 2510): Screen frozen for +311ms due to Window{41c29860 u0 com.example.test/com.example.test.MainActivity}
D/dalvikvm( 2510): GC_EXPLICIT freed 185K, 17% free 5572K/6664K, paused 4ms+4ms, total 69ms

路过的大侠,给点意见呗!

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

20

主题

46

帖子

1

粉丝