Android 2.3.7.r1 camera录像过程中按menu菜单键时会停止录像
程序员文章站
2023-12-01 19:48:28
android 2.3.7.r1 按menu键时会停止录像。改成录像时按menu键不做处理,可做如下修改: 在packages/apps/cameraopen/src/co...
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;
上一篇: java开发_图片截取工具实现原理
下一篇: Android 开启闪光灯做手电筒的详解