diff options
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/ScreenDecorations.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index 4dc227c91177..d3196f6c03e1 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -566,12 +566,8 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { List<DecorProvider> decorProviders = getProviders(mHwcScreenDecorationSupport != null); removeRedundantOverlayViews(decorProviders); - if (mHwcScreenDecorationSupport != null) { - createHwcOverlay(); - } else { - removeHwcOverlay(); - } - + // Overlays are added in 2 steps: first the standard overlays. Then, if applicable, the + // HWC overlays. This ensures that the HWC overlays are always on top boolean[] hasCreatedOverlay = new boolean[BOUNDS_POSITION_LENGTH]; final boolean shouldOptimizeVisibility = shouldOptimizeVisibility(); Integer bound; @@ -588,6 +584,13 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { } } + // Adding the HWC overlays second so they are on top by default + if (mHwcScreenDecorationSupport != null) { + createHwcOverlay(); + } else { + removeHwcOverlay(); + } + if (shouldOptimizeVisibility) { mDotViewController.setShowingListener(mPrivacyDotShowingListener); } else { |