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; 

posted @ 2013-06-14 22:44  爱生活,爱编程  阅读(252)  评论(0编辑  收藏  举报