当前位置:操作系统 > 安卓/Android >>

android GB版本的camera,录像过程中按“菜单”键会停止录像

Android 2.3.7.r1 按menu键时会停止录像。改成录像时按menu键不做处理,可做如下修改:

 在packages/apps/CameraOpen/src/com/mediatek/camera/VideoCamera.java

onKeyDown()方法中:

修改

     case KeyEvent.KEYCODE_MENU:

                     if (mHeadUpDisplay != null && mGLRootView != null

                                                        && !mAlertShowing && !mMediaRecorderRecording

                                        && mHeadUpDisplay.getWidth() != 0) {

                         mHeadUpDisplay.barsSwitch();

                     }

                if (mMediaRecorderRecording) {

                    onStopVideoRecording(true);

                    return true;

                } else if (event.isLongPress()) {

                   return true;             // consume long press to prevent soft keyboard

                }

                break;

为:

        case KeyEvent.KEYCODE_MENU:

                     if (mHeadUpDisplay != null && mGLRootView != null

                                                        && !mAlertShowing && !mMediaRecorderRecording

                                        && mHeadUpDisplay.getWidth() != 0) {

                         mHeadUpDisplay.barsSwitch();

                     }

                if (event.isLongPress()) {

                   return true;             // consume long press to prevent soft keyboard

                }

                break;

 

补充:移动开发 , Android ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,