导航栏NavigationBar
frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar); // Allow a system property to override this. Used by the emulator. // See also hasNavigationBar(). String navBarOverride = SystemProperties.get("qemu.hw.mainkeys"); if ("1".equals(navBarOverride)) { mHasNavigationBar = false; } else if ("0".equals(navBarOverride)) { mHasNavigationBar = true; }设置config_showNavigationBar为true就可以打开系统的虚拟键
framework/base/core/res/res/values/config.xml <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be autodetected from the Configuration. --> <bool name="config_showNavigationBar">true</bool> <!--<bool name="config_supportSystemNavigationKeys">false</bool>-->一般这种config 文件都会有overlay文件,所以也需要修改对应的device下的overlay文件
device\qcom\msm8953_64\overlay\frameworks\base\core\res\res\values\config.xml <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be autodetected from the Configuration. --> <bool name="config_showNavigationBar">true</bool> <!--<bool name="config_supportSystemNavigationKeys">false</bool>--> [3]添加配置文件添加qemu.hw.mainkeys=0,也就是修改 androdi系统的system/build.prop
device\qcom\msm8953_64\system.prop qemu.hw.mainkeys=0