/frameworks/base/core/res/res/values/config.xml
<!-- Controls the navigation bar interaction mode:
0: 3 button mode (back, home, overview buttons)
1: 2 button mode (back, home buttons + swipe up for overview)
2: gestures only for back, home and overview -->默认2:
<integer name="config_navBarInteractionMode">2</integer>
/device/mediatek/system/common/system.prop
# temporary enables NAV bar (soft keys) 虚拟键宏开关 0:开启 1:关闭
qemu.hw.mainkeys=1
主要问题:相机测试项拍照闪退将导致整机测试到此了
主要办法:修改布局:相机布局默认横屏,也就是横屏导致闪退了一下,需改为竖屏
/vendor/freeme/packages/apps/FreemeFactoryTest/AndroidManifest.xml
<activity
android:name=".camera.CameraTest"
android:clearTaskOnLaunch="true"
android:label="@string/Camera"
android:screenOrientation="portrait"
android:taskAffinity="android.task.camera" />
<activity
android:name=".camera.BackViceCamera"
android:clearTaskOnLaunch="true"
android:label="@string/Camera"
android:screenOrientation="portrait"
android:taskAffinity="android.task.camera" />
<activity
android:name=".camera.BackVice2Camera"
android:clearTaskOnLaunch="true"
android:label="@string/Camera"
android:screenOrientation="portrait"
android:taskAffinity="android.task.camera" />
<activity
android:name=".camera.SubCamera"
android:clearTaskOnLaunch="true"
android:label="@string/Camera"
android:screenOrientation="portrait"
android:stateNotNeeded="true"
android:taskAffinity="android.task.camera" />
2./vendor/freeme/packages/apps/FreemeFactoryTest/res/layout/camera.xml
android:orientation="vertical"采用垂直布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/main_background"
android:orientation="vertical"
android:baselineAligned="false" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextureView
android:id="@+id/camera_view"
android:layout_width="fill_parent"
android:layout_height="400dp" />
<LinearLayout
android:layout_width="@dimen/dual_camera_view_width"
android:layout_height="@dimen/dual_camera_view_heigth">
<TextureView
android:id="@+id/dual_camera_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</LinearLayout>
</RelativeLayout>
<CheckBox
android:id="@+id/camera_check_strobe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/btn_camera_check_strobe" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/camera_take"
android:layout_width="wrap_content"
android:layout_height="100.0dip"
android:layout_marginLeft="10.0dip"
android:background="@drawable/btn_default"
android:text="@string/Camera_takepic"
android:textColor="@color/Blue"
android:textSize="18sp" />
<Button
android:id="@+id/ResultOK"
android:layout_width="wrap_content"
android:layout_height="100.0dip"
android:layout_marginLeft="20.0dip"
android:background="@drawable/btn_fcm_sucess"
android:text="@string/Success"
android:textColor="@color/gray"
android:textSize="18sp" />
<Button
android:id="@+id/ResultFail"
android:layout_width="wrap_content"
android:layout_height="100.0dip"
android:layout_marginLeft="20.0dip"
android:background="@drawable/btn_fcm_fail"
android:text="@string/Failed"
android:textColor="@color/gray"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>文章来源:https://www.toymoban.com/news/detail-626218.html
其他布局需要自主微调了文章来源地址https://www.toymoban.com/news/detail-626218.html
到了这里,关于虚拟按键宏1关闭,导致工模测试相机拍摄退出闪屏一下的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!