Android 2.3.7.r1 camera录像过程中按menu菜单键时会停止录像
时间:2021-08-10 09:24:10|栏目:Android代码|点击: 次
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;
在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代码
本文标题:Android 2.3.7.r1 camera录像过程中按menu菜单键时会停止录像
本文地址:http://www.codeinn.net/misctech/165593.html