1.快速非常规修改:
在项目frameworksasepolicysrccomandroidinternalpolicyimplPhoneWindowManager.java中的public void setInitialDisplaySize(Display display, int width, int height, int density)中修改
/// M:[SmartBook]Don't show navigation bar if SmartBook plugged in @{
if (FeatureOption.MTK_SMARTBOOK_SUPPORT) {
mNavigationBarCanMove = false;
mHasNavigationBar = mSmartBookPlugIn ? false : mContext.getResources().getBoolean(
com.android.internal.R.bool.config_showNavigationBar);
Slog.d(TAG, "mSmartBookPlugIn:" + mSmartBookPlugIn + ", mHasNavigationBar:" + mHasNavigationBar);
}
/// @}
// 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;
}
mHasNavigationBar = true;//增加这一句
2.常规修改:
1.项目/frameworks/base/core/res/res/values/config.xml文件 中<bool name=“config_showNavigationBar”>true</bool>,并权健查找config_showNavigationBar所有的配置的地方,有的项目多个地方配置该变量,全部修改为true
2.如果上面的xml文件定义都是true,请再确认下system.prop 是否有qemu.hw.mainkeys=1
如果有,请去掉qemu.hw.mainkeys=1的定义