Loading services/core/java/com/android/server/wm/WindowState.java +19 −1 Original line number Diff line number Diff line Loading @@ -4270,6 +4270,24 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } } private boolean skipDecorCrop() { // The decor frame is used to specify the region not covered by the system // decorations (nav bar, status bar). In case this is empty, for example with // FLAG_TRANSLUCENT_NAVIGATION, we don't need to do any cropping. if (mDecorFrame.isEmpty()) { return true; } // But if we have a frame, and are an application window, then we must be cropped. if (mAppToken != null) { return false; } // For non application windows, we may be allowed to extend over the decor bars // depending on our type and permissions assosciated with our token. return mToken.canLayerAboveSystemBars(); } /** * Calculate the window crop according to system decor policy. In general this is * the system decor rect (see #calculateSystemDecorRect), but we also have some Loading @@ -4287,7 +4305,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP policyCrop.intersect(-mCompatFrame.left, -mCompatFrame.top, displayInfo.logicalWidth - mCompatFrame.left, displayInfo.logicalHeight - mCompatFrame.top); } else if (mDecorFrame.isEmpty()) { } else if (skipDecorCrop()) { // Windows without policy decor aren't cropped. policyCrop.set(0, 0, mCompatFrame.width(), mCompatFrame.height()); } else { Loading services/core/java/com/android/server/wm/WindowToken.java +13 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.server.wm; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_MOVEMENT; Loading Loading @@ -336,4 +336,16 @@ class WindowToken extends WindowContainer<WindowState> { boolean okToAnimate() { return mDisplayContent != null && mDisplayContent.okToAnimate(); } /** * Return whether windows from this token can layer above the * system bars, or in other words extend outside of the "Decor Frame" */ boolean canLayerAboveSystemBars() { int layer = mService.mPolicy.getWindowLayerFromTypeLw(windowType, mOwnerCanManageAppTokens); int navLayer = mService.mPolicy.getWindowLayerFromTypeLw(TYPE_NAVIGATION_BAR, mOwnerCanManageAppTokens); return mOwnerCanManageAppTokens && (layer > navLayer); } } Loading
services/core/java/com/android/server/wm/WindowState.java +19 −1 Original line number Diff line number Diff line Loading @@ -4270,6 +4270,24 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } } private boolean skipDecorCrop() { // The decor frame is used to specify the region not covered by the system // decorations (nav bar, status bar). In case this is empty, for example with // FLAG_TRANSLUCENT_NAVIGATION, we don't need to do any cropping. if (mDecorFrame.isEmpty()) { return true; } // But if we have a frame, and are an application window, then we must be cropped. if (mAppToken != null) { return false; } // For non application windows, we may be allowed to extend over the decor bars // depending on our type and permissions assosciated with our token. return mToken.canLayerAboveSystemBars(); } /** * Calculate the window crop according to system decor policy. In general this is * the system decor rect (see #calculateSystemDecorRect), but we also have some Loading @@ -4287,7 +4305,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP policyCrop.intersect(-mCompatFrame.left, -mCompatFrame.top, displayInfo.logicalWidth - mCompatFrame.left, displayInfo.logicalHeight - mCompatFrame.top); } else if (mDecorFrame.isEmpty()) { } else if (skipDecorCrop()) { // Windows without policy decor aren't cropped. policyCrop.set(0, 0, mCompatFrame.width(), mCompatFrame.height()); } else { Loading
services/core/java/com/android/server/wm/WindowToken.java +13 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.server.wm; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_MOVEMENT; Loading Loading @@ -336,4 +336,16 @@ class WindowToken extends WindowContainer<WindowState> { boolean okToAnimate() { return mDisplayContent != null && mDisplayContent.okToAnimate(); } /** * Return whether windows from this token can layer above the * system bars, or in other words extend outside of the "Decor Frame" */ boolean canLayerAboveSystemBars() { int layer = mService.mPolicy.getWindowLayerFromTypeLw(windowType, mOwnerCanManageAppTokens); int navLayer = mService.mPolicy.getWindowLayerFromTypeLw(TYPE_NAVIGATION_BAR, mOwnerCanManageAppTokens); return mOwnerCanManageAppTokens && (layer > navLayer); } }