/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>
其他布局需要自主微调了