Do not use the status bar as the system decor layer if it is not visible.

Doing so leads to cropping of the content view, which is smaller than the
screen size on some devices with improperly configured overscan values. It
can also lead to performance issues with some activity transition
animations on Wear.

Bug: 19928768
Change-Id: Ic50c2fedb1f8be9a8ea5166fef5a5665958601de
This commit is contained in:
Bryce Lee
2015-04-01 10:57:21 -07:00
parent 6e6250b961
commit ae41dcab07

View File

@@ -3508,8 +3508,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
/** {@inheritDoc} */
@Override
public int getSystemDecorLayerLw() {
if (mStatusBar != null) return mStatusBar.getSurfaceLayer();
if (mNavigationBar != null) return mNavigationBar.getSurfaceLayer();
if (mStatusBar != null && mStatusBar.isVisibleLw()) {
return mStatusBar.getSurfaceLayer();
}
if (mNavigationBar != null && mNavigationBar.isVisibleLw()) {
return mNavigationBar.getSurfaceLayer();
}
return 0;
}