Android 2.3.7.r1 camera录像过程中按menu菜单键时会停止录像
程序员文章站
2023-08-12 20:09:59
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;
上一篇: 西红柿蛋汤怎么做好吃,今天就来学一学
下一篇: 女生必看:2个瑜伽动作让你“波”涛汹涌