Plugging USB into Android device causes CameraHAL to pause the current activity for 1-2 seconds

-1

I'm working on a fitness application on a custom tablet running Android version 5.1.1. The tablets have a built in camera which works great, and there are accelerometers that also work great which are connected to the tablet via a USBA 2.0 cable. The application was built using Unity, but this seems to be lower level issue with Android.

I noticed that occasionally during use the application would pause for a second or two, halting all input and output. It can be quite annoying for the user. I did some digging through the logs and it seems the issue arises when the tablet detects that a USB device has been plugged in. I imagine that during use, the machine our tablet is attached to can jiggle enough that the USB thinks it gets unplugged and plugged back in very quickly. Since our accelerometers are what the USB is responsible for, I thought they might be the culprit here. Tried making them skip their initialization functions in the app. App still froze up so I tried other USB devices and it turns out this happens whenever ANY usb device gets plugged in.

It would appear that a USB device getting plugged in is causing the Camera HAL to stop what it's doing an reinitialize everything?

Here is the entire logcat from the moment I plug in a USB device, through the time it's frozen, and all the way till the activity resumes again:

W/Unity   (30839):
W/Vold    (  178): subsystem found in netlink event
D/Vold    (  178): handleEvent   usb, 1
D/Vold    (  178): == current usb device: 04D8/F2A9 ===
W/Vold    (  178): subsystem found in netlink event
D/Vold    (  178): handleEvent   usb, 1
D/UsbHostManager(  487): Added device UsbDevice[mName=/dev/bus/usb/001/053,mVendorId=1240,mProductId=62121,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=Nexersys Corp.,mProductName=Aggboard PCB-2037PC,mSerialNumber=null,mConfigurations=[
D/UsbHostManager(  487): UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=50,mInterfaces=[
D/UsbHostManager(  487): UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=3,mSubclass=0,mProtocol=0,mEndpoints=[
D/UsbHostManager(  487): UsbEndpoint[mAddress=129,mAttributes=3,mMaxPacketSize=64,mInterval=1]
D/UsbHostManager(  487): UsbEndpoint[mAddress=1,mAttributes=3,mMaxPacketSize=64,mInterval=1]]]]
W/ContextImpl(  487): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1344 com.android.server.usb.UsbSettingsManager.deviceAttached:741 com.android.server.usb.UsbHostManager.endUsbDeviceAdded:224 com.android.server.usb.UsbHostManager.monitorUsbHostBus:-2 com.android.server.usb.UsbHostManager.access$000:42
I/ActivityStackSupervisor(  487): START u0 {act=android.hardware.usb.action.USB_DEVICE_ATTACHED flg=0x10000000 cmp=com.nexersys.fitness/.AndroidUnityPlayerActivity (has extras)} from uid 1000 on display 0
D/AndroidUnityActivity(30839): intent action = android.hardware.usb.action.USB_DEVICE_ATTACHED
D/NexersysFitnessUnity(30839): AggBoard Cleanup
D/NexersysFitnessUnity(30839): USB Interface Released.
D/AndroidUnityActivity(30839): aggboard created in receiver
D/NexersysFitnessUnity(30839): AggBoard Constructor
D/AndroidUnityActivity(30839): onPause called. Throwing exception just so I can see the stacktrace.
D/AndroidUnityActivity(30839): java.lang.Exception
D/AndroidUnityActivity(30839):  at com.nexersys.fitness.AndroidUnityPlayerActivity.onPause(AndroidUnityPlayerActivity.java:395)
D/AndroidUnityActivity(30839):  at android.app.Activity.performPause(Activity.java:6333)
D/AndroidUnityActivity(30839):  at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1310)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.performNewIntents(ActivityThread.java:2486)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2497)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.access$1600(ActivityThread.java:151)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1391)
D/AndroidUnityActivity(30839):  at android.os.Handler.dispatchMessage(Handler.java:102)
D/AndroidUnityActivity(30839):  at android.os.Looper.loop(Looper.java:135)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.main(ActivityThread.java:5280)
D/AndroidUnityActivity(30839):  at java.lang.reflect.Method.invoke(Native Method)
D/AndroidUnityActivity(30839):  at java.lang.reflect.Method.invoke(Method.java:372)
D/AndroidUnityActivity(30839):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
D/AndroidUnityActivity(30839):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
I/NexersysFitnessUnity(30839): 64 bytes received:
D/CameraHal(  184): commandThread(983): commandThread(983): receive CMD_PREVIEW_CAPTURE_CANCEL
D/CameraHal(  184): commandThread(991): commandThread(991): CMD_PREVIEW_CAPTURE_CANCEL out
D/CameraHal(  184): cancelPicture(561): cancel picture OK.
D/CameraHal(  184): commandThread(911): commandThread(911):receive CMD_PREVIEW_STOP
D/CameraHal(  184): displayThread(610): displayThread(610): receive CMD_DISPLAY_PAUSE
D/CameraHal(  184): stop(1792): m_camDevice->stopPreview success!
D/CameraHal(  184): commandThread(932): commandThread(932): CMD_PREVIEW_STOP out
D/CameraHal(  184): stopPreview(362): stop preview OK.
D/CameraHal(  184): commandThread(983): commandThread(983): receive CMD_PREVIEW_CAPTURE_CANCEL
D/CameraHal(  184): commandThread(991): commandThread(991): CMD_PREVIEW_CAPTURE_CANCEL out
D/CameraHal(  184): cancelPicture(561): cancel picture OK.
D/CameraHal(  184): commandThread(911): commandThread(911):receive CMD_PREVIEW_STOP
D/CameraHal(  184): commandThread(932): commandThread(932): CMD_PREVIEW_STOP out
D/CameraHal(  184): stopPreview(362): stop preview OK.
D/CameraHal(  184): commandThread(937): commandThread(937):receive CMD_SET_PREVIEW_WINDOW
D/CameraHal(  184): pauseDisplay(159): pauseDisplay(159): display thread is already stop
D/CameraHal(  184): commandThread(953): commandThread(953): CMD_SET_PREVIEW_WINDOW out
I/CameraClient(  184): Destroying camera 0
D/CameraHal(  184): camera_device_close(451): camera_device_close
D/CameraHal(  184): disableSensor(237): orientation = 0xb75d7d70 (Gravity sensor)
D/CameraHal(  184): ~SensorListener(110): Kill looper thread
D/CameraHal(  184): ~SensorListener(122): Kill looper
D/CameraHal(  184): ~SensorListener(128): SensorListener destroyed
D/CameraHal(  184): displayThread(622): displayThread(622): receive CMD_DISPLAY_STOP
D/CameraHal(  184): cameraDisplayBufferDestory(399): cameraDisplayBufferDestory(399): mANativeWindow is NULL, destory is ignore
D/CameraHal(  184): encProcessThread(1641): encProcessThread(1641): receive CMD_ENCPROCESS_EXIT
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (720000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (640000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (560000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (480000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (400000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (320000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (240000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (160000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (80000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (0)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:552:
W/Vold    (  178): subsystem found in netlink event
D/Vold    (  178): handleEvent   usb, 2
W/Vold    (  178): subsystem found in netlink event
D/Vold    (  178): handleEvent   usb, 2
D/CameraHal(  184): commandThread(1095): commandThread(1095): receive CMD_EXIT
D/CameraHal(  184): ~CameraHal(293): CameraHal destory success
W/CameraService(  184): removeClient: clear camera 0, package name com.nexersys.fitness
D/mmk     (  663): onStatusChangedLocked.+++++++
E/CameraManagerGlobal(  663): Camera id 0 has status changed to 0x1
D/mmk     (  663): postSingleUpdate.+++++++++ status = 1
D/mmk     (30839): onStatusChangedLocked.+++++++
E/CameraManagerGlobal(30839): Camera id 0 has status changed to 0x1
I/FrameQueueManage(  184): FrameQueueManage::~FrameQueueManage end!
I/FrameQueueManage(  184): FrameQueueManage::~FrameQueueManage end!
D/AndroidUnityActivity(30839): Resuming instance
D/NexersysFitnessUnity(30839): 0 nulls between legit messages.
D/NexersysFitnessUnity(30839): Received f5 with f5 1 1 0 0 0 0 0 0 aa
D/AndroidUnityActivity(30839): intent action = android.hardware.usb.action.USB_DEVICE_DETACHED
D/CameraHal(  184): camera_get_camera_info(1313): camera_get_camera_info(1313): camera_0 facing(1), orientation(0)
I/AwesomePlayer(  184): AwesomePlayer::AwesomePlayer()in
I/AwesomePlayer(  184): AwesomePlayer::AwesomePlayer()aftermClient.connect()
I/AwesomePlayer(  184): setDataSource_l(<no-scheme URI suppressed>)
I/OMXCodec(  184): --->InstantiateSoftwareCodec create OMX.google.vorbis.decoder codec
I/OMXCodec(  184): Successfully allocated OMX node 'OMX.google.vorbis.decoder'
I/AwesomePlayer(  184): AwesomePlayer::AwesomePlayer()in
I/AwesomePlayer(  184): AwesomePlayer::AwesomePlayer()aftermClient.connect()
I/AwesomePlayer(  184): setDataSource_l(<no-scheme URI suppressed>)
I/OMXCodec(  184): --->InstantiateSoftwareCodec create OMX.google.vorbis.decoder codec
I/OMXCodec(  184): Successfully allocated OMX node 'OMX.google.vorbis.decoder'
I/CameraClient(  184): Opening camera 0
D/CameraHal(  184): camera_get_camera_info(1313): camera_get_camera_info(1313): camera_0 facing(1), orientation(0)
I/CameraHal(  184): camera_device_open(500): camera_device open
D/CameraHal(  184): gCameraHalLogLevel: 0
D/mmk     (  663): onStatusChangedLocked.+++++++
E/CameraManagerGlobal(  663): Camera id 0 has status changed to 0x80000000
D/CameraHal(  184): CameraHal(125): it is a isp soc camera
D/mmk     (  663): postSingleUpdate.+++++++++ status = -2147483648
D/CameraHal(  184): Calling process is: com.nexersys.fitness
I/vpu_mem_pool(  184): pid 184, open_vpu_memory_pool:473: success
D/mmk     (30839): onStatusChangedLocked.+++++++
E/CameraManagerGlobal(30839): Camera id 0 has status changed to 0x80000000
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (80000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 45
E/CameraHal_Marvin(  184): HAL-MOCKUP: CAMSYS_QUREYIOMMU failed !!!!
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (160000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 47
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (240000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 48
E/CameraHal(  184): disconnectCamera(1717): getFocusLimits failed!
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (320000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 49
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (400000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 50
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (480000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 51
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (560000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 52
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (640000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 53
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (720000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 54
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:717: vpu memory pool size (800000)
I/vpu_mem_pool(  184): pid 184, vpu_mem_allocator:720: ion_alloc_fd success, memory fd 55
D/CameraHal_Marvin(  184):
D/CameraHal_Marvin(  184):
D/CameraHal_Marvin(  184):
D/CameraHal_Marvin(  184): CameraHal Version Check:
D/CameraHal_Marvin(  184):     CamSys_Head.h version:
D/CameraHal_Marvin(  184):        kernel: (0x) v0.b.0
D/CameraHal_Marvin(  184):        libisp_siliconimage_isp.so: (0x) v0.b.0
D/CameraHal_Marvin(  184):     LibIsp version:
D/CameraHal_Marvin(  184):        local: (0x) v1.27.0
D/CameraHal_Marvin(  184):        camera.rk30board.so: (0x) v1.27.0
D/CameraHal_Marvin(  184):     Sensor ISI version:
D/CameraHal_Marvin(  184):         libisp_isi_drv_XXX: (0x) v0.a.0
D/CameraHal_Marvin(  184):         libisp_siliconimage_isp.so: (0x) v0.a.0
D/CameraHal_Marvin(  184):     sensor name GC2155:
D/CameraHal_Marvin(  184):        sensor drv version: (0x) v0.5.0
D/CameraHal_Marvin(  184):
D/CameraHal_Marvin(  184):
D/CameraHal_Marvin(  184):
W/Vold    (  178): subsystem found in netlink event
D/Vold    (  178): handleEvent   usb, 1
D/Vold    (  178): == current usb device: 04D8/F2A9 ===
W/Vold    (  178): subsystem found in netlink event
D/Vold    (  178): handleEvent   usb, 1
D/UsbHostManager(  487): Added device UsbDevice[mName=/dev/bus/usb/001/054,mVendorId=1240,mProductId=62121,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=Nexersys Corp.,mProductName=Aggboard PCB-2037PC,mSerialNumber=null,mConfigurations=[
D/UsbHostManager(  487): UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=50,mInterfaces=[
D/UsbHostManager(  487): UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=3,mSubclass=0,mProtocol=0,mEndpoints=[
D/UsbHostManager(  487): UsbEndpoint[mAddress=129,mAttributes=3,mMaxPacketSize=64,mInterval=1]
D/UsbHostManager(  487): UsbEndpoint[mAddress=1,mAttributes=3,mMaxPacketSize=64,mInterval=1]]]]
W/ContextImpl(  487): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1344 com.android.server.usb.UsbSettingsManager.deviceAttached:741 com.android.server.usb.UsbHostManager.endUsbDeviceAdded:224 com.android.server.usb.UsbHostManager.monitorUsbHostBus:-2 com.android.server.usb.UsbHostManager.access$000:42
I/ActivityStackSupervisor(  487): START u0 {act=android.hardware.usb.action.USB_DEVICE_ATTACHED flg=0x10000000 cmp=com.nexersys.fitness/.AndroidUnityPlayerActivity (has extras)} from uid 1000 on display 0
D/AndroidUnityActivity(30839): intent action = android.hardware.usb.action.USB_DEVICE_ATTACHED
D/NexersysFitnessUnity(30839): AggBoard Cleanup
D/NexersysFitnessUnity(30839): USB Interface Released.
D/AndroidUnityActivity(30839): aggboard created in receiver
D/NexersysFitnessUnity(30839): AggBoard Constructor
D/AndroidUnityActivity(30839): onPause called. Throwing exception just so I can see the stacktrace.
D/AndroidUnityActivity(30839): java.lang.Exception
D/AndroidUnityActivity(30839):  at com.nexersys.fitness.AndroidUnityPlayerActivity.onPause(AndroidUnityPlayerActivity.java:395)
D/AndroidUnityActivity(30839):  at android.app.Activity.performPause(Activity.java:6333)
D/AndroidUnityActivity(30839):  at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1310)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.performNewIntents(ActivityThread.java:2486)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2497)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.access$1600(ActivityThread.java:151)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1391)
D/AndroidUnityActivity(30839):  at android.os.Handler.dispatchMessage(Handler.java:102)
D/AndroidUnityActivity(30839):  at android.os.Looper.loop(Looper.java:135)
D/AndroidUnityActivity(30839):  at android.app.ActivityThread.main(ActivityThread.java:5280)
D/AndroidUnityActivity(30839):  at java.lang.reflect.Method.invoke(Native Method)
D/AndroidUnityActivity(30839):  at java.lang.reflect.Method.invoke(Method.java:372)
D/AndroidUnityActivity(30839):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
D/AndroidUnityActivity(30839):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
E/CameraHal_Marvin(  184): ADPF: AdpfStart: Can't enable CamerIc DPF (8)
E/CameraHal_Marvin(  184): ADPCC: AdpccStart: Can't enable CamerIc DPCC (8)
D/CameraHal(  184): Calling process is: com.nexersys.fitness
D/CameraHal(  184): enableSensor(213): orientation = 0xb75d7d70 (Gravity sensor)
W/CameraService(  184): CameraService::connect X (id 0, this pid is 184, name com.nexersys.fitness)
D/CameraHal(  184): commandThread(937): commandThread(937):receive CMD_SET_PREVIEW_WINDOW
D/CameraHal(  184): commandThread(953): commandThread(953): CMD_SET_PREVIEW_WINDOW out
D/CameraHal(  184): commandThread(832): commandThread(832):receive CMD_PREVIEW_START
D/CameraHal(  184): stop(1792): m_camDevice->stopPreview success!
E/CameraHal_Marvin(  184): CAM_API_CAMENGINE: changeResolution (can't change resolution of sensor)
D/CameraHal(  184): start(1747): m_camDevice->startPreview success
D/CameraHal(  184): displayThread(596): displayThread(596): receive CMD_DISPLAY_START
D/CameraHal(  184): cameraDisplayBufferDestory(399): cameraDisplayBufferDestory(399): mANativeWindow is NULL, destory is ignore
D/CameraHal(  184): commandThread(905): commandThread(905): CMD_PREVIEW_START out
D/CameraHal(  184): commandThread(983): commandThread(983): receive CMD_PREVIEW_CAPTURE_CANCEL
D/CameraHal(  184): commandThread(991): commandThread(991): CMD_PREVIEW_CAPTURE_CANCEL out
D/CameraHal(  184): cancelPicture(561): cancel picture OK.
D/CameraHal(  184): commandThread(911): commandThread(911):receive CMD_PREVIEW_STOP
D/CameraHal(  184): displayThread(610): displayThread(610): receive CMD_DISPLAY_PAUSE
E/CameraHal_Marvin(  184): CAMERIC-MI-IRQ: CamerIcMiIrq: MP buffer skipped (reused),pDrvCtx->invalFrame === 0,g_miFrameNum == 1;numFramesToSkip == 1
D/CameraHal(  184): stop(1792): m_camDevice->stopPreview success!
D/CameraHal(  184): commandThread(932): commandThread(932): CMD_PREVIEW_STOP out
D/CameraHal(  184): stopPreview(362): stop preview OK.
D/CameraHal(  184): commandThread(983): commandThread(983): receive CMD_PREVIEW_CAPTURE_CANCEL
D/CameraHal(  184): commandThread(991): commandThread(991): CMD_PREVIEW_CAPTURE_CANCEL out
D/CameraHal(  184): cancelPicture(561): cancel picture OK.
D/CameraHal(  184): commandThread(911): commandThread(911):receive CMD_PREVIEW_STOP
D/CameraHal(  184): commandThread(932): commandThread(932): CMD_PREVIEW_STOP out
D/CameraHal(  184): stopPreview(362): stop preview OK.
D/CameraHal(  184): commandThread(937): commandThread(937):receive CMD_SET_PREVIEW_WINDOW
D/CameraHal(  184): pauseDisplay(159): pauseDisplay(159): display thread is already stop
D/CameraHal(  184): commandThread(953): commandThread(953): CMD_SET_PREVIEW_WINDOW out
I/CameraClient(  184): Destroying camera 0
D/CameraHal(  184): camera_device_close(451): camera_device_close
D/CameraHal(  184): disableSensor(237): orientation = 0xb75d7d70 (Gravity sensor)
D/CameraHal(  184): ~SensorListener(110): Kill looper thread
D/CameraHal(  184): ~SensorListener(122): Kill looper
D/CameraHal(  184): ~SensorListener(128): SensorListener destroyed
D/CameraHal(  184): displayThread(622): displayThread(622): receive CMD_DISPLAY_STOP
D/CameraHal(  184): cameraDisplayBufferDestory(399): cameraDisplayBufferDestory(399): mANativeWindow is NULL, destory is ignore
D/CameraHal(  184): encProcessThread(1641): encProcessThread(1641): receive CMD_ENCPROCESS_EXIT
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (720000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (640000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (560000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (480000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (400000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (320000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (240000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (160000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (80000)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:501: vpu memory pool size (0)
I/vpu_mem_pool(  184): pid 184, close_vpu_memory_pool:552:
D/CameraHal(  184): commandThread(1095): commandThread(1095): receive CMD_EXIT
D/CameraHal(  184): ~CameraHal(293): CameraHal destory success
W/CameraService(  184): removeClient: clear camera 0, package name com.nexersys.fitness
D/mmk     (30839): onStatusChangedLocked.+++++++
D/mmk     (  663): onStatusChangedLocked.+++++++
E/CameraManagerGlobal(  663): Camera id 0 has status changed to 0x1
E/CameraManagerGlobal(30839): Camera id 0 has status changed to 0x1
D/mmk     (  663): postSingleUpdate.+++++++++ status = 1
I/FrameQueueManage(  184): FrameQueueManage::~FrameQueueManage end!
I/FrameQueueManage(  184): FrameQueueManage::~FrameQueueManage end!
D/AndroidUnityActivity(30839): Resuming instance

The documentation for Camera HAL is sparse and unsatisfying for me right now, so I'm stuck trying to figure out why plugging in a USB device essentially makes it have to take 1-2 seconds to recompose itself. If anyone has a clue as to what might be going on, I would highly appreaciate it. Unexpected 1-2 second pauses during execution can be quite frustrating.

java
android
unity3d
android-activity
usb
asked on Stack Overflow Feb 8, 2021 by BradleyKern

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0