本文档以SC826(msm8953平台,Android 7)为例,说明去掉初次全屏时的向导界面。
初次进入系统,第一次显示全屏界面时会弹出如下向导界面:
怎么隐藏掉这个界面。
该界面对应的布局文件为
frameworks/base/core/res/res/layout/immersive_mode_cling.xml
该布局文件在
frameworks/base/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
中加载。想隐藏该界面,勿将其加载即可,对应补丁代码如下:
--- a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
@@ -295,7 295,8 @@ public class ImmersiveModeConfirmation {
final Button ok = (Button) mClingLayout.findViewById(R.id.ok);
ok.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mConfirm.run();
}
});
- addView(mClingLayout, getBubbleLayoutParams());
//addView(mClingLayout, getBubbleLayoutParams());
if (ActivityManager.isHighEndGfx()) {
@@ -332,6 333,9 @@ public class ImmersiveModeConfirmation {
mContext.registerReceiver(mReceiver,
new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED));
mConfirm.run();
}
,Copyright © 2008-2022 秒下下载站
m.down10s.com .All Rights Reserved