L上偶现状态栏下移问题
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
android L上默认带有navigation bar, 在去掉navigationbar后, 会概率性的出现状态栏下移的现象,如下图所示。
[SOLUTION]
可以自行申请ALPS02138041这笔patch解决此问题。
如果对应版本上没有此patch, 也可以自行按如下修改中将对应文件函数改为如下如示。
另外:patch中只包含了第一处修改,但在某些条件下,如图案锁界面进紧急拨号再按home键回到锁屏,反复操作后状态栏下移的现象也会概率性的出现,还需要加入第二处修改解决。第二处修改未合入patch是因为这处修改可能会对performance有一点点影响。
(1)PhoneWindowManager.java中
private boolean setKeyguardOccludedLw(boolean isOccluded) {
boolean wasOccluded = mKeyguardOccluded;
boolean showing = mKeyguardDelegate.isShowing();
if (wasOccluded && !isOccluded) {
mKeyguardOccluded = false;
mKeyguardDelegate.setOccluded(false);
if (showing) {
mStatusBar.getAttrs().privateFlags |= PRIVATE_FLAG_KEYGUARD;
mStatusBar.getAttrs().flags |= FLAG_SHOW_WALLPAPER;
return true;
}
} else if (!wasOccluded && isOccluded && showing) {
mKeyguardOccluded = true;
mKeyguardDelegate.setOccluded(true);
mStatusBar.getAttrs().privateFlags &= ~PRIVATE_FLAG_KEYGUARD;
mStatusBar.getAttrs().flags &= ~FLAG_SHOW_WALLPAPER;
return true;
}
return false;
}
(2) StatusBarWindowManager.Java 中
private void applyFitsSystemWindows(State state) {
mStatusBarView.setFitsSystemWindows(!state.isKeyguardShowingAndNotOccluded());
if (state.isKeyguardShowingAndNotOccluded()) {
mStatusBarView.requestFitSystemWindows();
}
}
android L上默认带有navigation bar, 在去掉navigationbar后, 会概率性的出现状态栏下移的现象,如下图所示。
[SOLUTION]
可以自行申请ALPS02138041这笔patch解决此问题。
如果对应版本上没有此patch, 也可以自行按如下修改中将对应文件函数改为如下如示。
另外:patch中只包含了第一处修改,但在某些条件下,如图案锁界面进紧急拨号再按home键回到锁屏,反复操作后状态栏下移的现象也会概率性的出现,还需要加入第二处修改解决。第二处修改未合入patch是因为这处修改可能会对performance有一点点影响。
(1)PhoneWindowManager.java中
private boolean setKeyguardOccludedLw(boolean isOccluded) {
boolean wasOccluded = mKeyguardOccluded;
boolean showing = mKeyguardDelegate.isShowing();
if (wasOccluded && !isOccluded) {
mKeyguardOccluded = false;
mKeyguardDelegate.setOccluded(false);
if (showing) {
mStatusBar.getAttrs().privateFlags |= PRIVATE_FLAG_KEYGUARD;
mStatusBar.getAttrs().flags |= FLAG_SHOW_WALLPAPER;
return true;
}
} else if (!wasOccluded && isOccluded && showing) {
mKeyguardOccluded = true;
mKeyguardDelegate.setOccluded(true);
mStatusBar.getAttrs().privateFlags &= ~PRIVATE_FLAG_KEYGUARD;
mStatusBar.getAttrs().flags &= ~FLAG_SHOW_WALLPAPER;
return true;
}
return false;
}
(2) StatusBarWindowManager.Java 中
private void applyFitsSystemWindows(State state) {
mStatusBarView.setFitsSystemWindows(!state.isKeyguardShowingAndNotOccluded());
if (state.isKeyguardShowingAndNotOccluded()) {
mStatusBarView.requestFitSystemWindows();
}
}
学习学习!
学习了~~~~~~~~~~~