Loading core/tests/coretests/src/android/view/InsetsAnimationControlImplTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public class InsetsAnimationControlImplTest { } @AfterClass public static void tearDownOnce() throws Exception { public static void tearDownOnce() { sInsetsModeSession.close(); } Loading services/core/java/com/android/server/wm/BarController.java +5 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.SystemClock; import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.View; import android.view.ViewRootImpl; import android.view.WindowManager; import com.android.server.LocalServices; Loading Loading @@ -89,6 +90,10 @@ public class BarController { } void setWindow(WindowState win) { if (ViewRootImpl.sNewInsetsMode == ViewRootImpl.NEW_INSETS_MODE_FULL) { // BarController gets replaced with InsetsPolicy in the full insets mode. return; } mWin = win; } Loading services/core/java/com/android/server/wm/DisplayContent.java +6 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo private final PointerEventDispatcher mPointerEventDispatcher; private final InsetsStateController mInsetsStateController; private final InsetsPolicy mInsetsPolicy; /** @see #getParentWindow() */ private WindowState mParentWindow; Loading Loading @@ -968,6 +969,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo mWmService.mAnimator.addDisplayLocked(mDisplayId); mInputMonitor = new InputMonitor(service, mDisplayId); mInsetsStateController = new InsetsStateController(this); mInsetsPolicy = new InsetsPolicy(mInsetsStateController, this); } boolean isReady() { Loading Loading @@ -1126,6 +1128,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo return mInsetsStateController; } InsetsPolicy getInsetsPolicy() { return mInsetsPolicy; } @Surface.Rotation int getRotation() { return mDisplayRotation.getRotation(); Loading services/core/java/com/android/server/wm/DisplayPolicy.java +9 −2 Original line number Diff line number Diff line Loading @@ -1029,6 +1029,14 @@ public class DisplayPolicy { displayFrames.mDisplayCutoutSafe.top); } WindowState getStatusBar() { return mStatusBar; } WindowState getNavigationBar() { return mNavigationBar; } /** * Control the animation to run when a window's state changes. Return a * non-0 number to force the animation to a specific resource ID, or 0 Loading Loading @@ -3108,8 +3116,7 @@ public class DisplayPolicy { return 0; } mDisplayContent.getInsetsStateController().onBarControllingWindowChanged( mTopFullscreenOpaqueWindowState); mDisplayContent.getInsetsPolicy().updateBarControlTarget(win); int tmpVisibility = PolicyControl.getSystemUiVisibility(win, null) & ~mResettingSystemUiFlags Loading services/core/java/com/android/server/wm/InsetsControlTarget.java 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.wm; /** * Generalization of an object that can control insets state. */ interface InsetsControlTarget { void notifyInsetsControlChanged(); } Loading
core/tests/coretests/src/android/view/InsetsAnimationControlImplTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public class InsetsAnimationControlImplTest { } @AfterClass public static void tearDownOnce() throws Exception { public static void tearDownOnce() { sInsetsModeSession.close(); } Loading
services/core/java/com/android/server/wm/BarController.java +5 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.SystemClock; import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.View; import android.view.ViewRootImpl; import android.view.WindowManager; import com.android.server.LocalServices; Loading Loading @@ -89,6 +90,10 @@ public class BarController { } void setWindow(WindowState win) { if (ViewRootImpl.sNewInsetsMode == ViewRootImpl.NEW_INSETS_MODE_FULL) { // BarController gets replaced with InsetsPolicy in the full insets mode. return; } mWin = win; } Loading
services/core/java/com/android/server/wm/DisplayContent.java +6 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo private final PointerEventDispatcher mPointerEventDispatcher; private final InsetsStateController mInsetsStateController; private final InsetsPolicy mInsetsPolicy; /** @see #getParentWindow() */ private WindowState mParentWindow; Loading Loading @@ -968,6 +969,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo mWmService.mAnimator.addDisplayLocked(mDisplayId); mInputMonitor = new InputMonitor(service, mDisplayId); mInsetsStateController = new InsetsStateController(this); mInsetsPolicy = new InsetsPolicy(mInsetsStateController, this); } boolean isReady() { Loading Loading @@ -1126,6 +1128,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo return mInsetsStateController; } InsetsPolicy getInsetsPolicy() { return mInsetsPolicy; } @Surface.Rotation int getRotation() { return mDisplayRotation.getRotation(); Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +9 −2 Original line number Diff line number Diff line Loading @@ -1029,6 +1029,14 @@ public class DisplayPolicy { displayFrames.mDisplayCutoutSafe.top); } WindowState getStatusBar() { return mStatusBar; } WindowState getNavigationBar() { return mNavigationBar; } /** * Control the animation to run when a window's state changes. Return a * non-0 number to force the animation to a specific resource ID, or 0 Loading Loading @@ -3108,8 +3116,7 @@ public class DisplayPolicy { return 0; } mDisplayContent.getInsetsStateController().onBarControllingWindowChanged( mTopFullscreenOpaqueWindowState); mDisplayContent.getInsetsPolicy().updateBarControlTarget(win); int tmpVisibility = PolicyControl.getSystemUiVisibility(win, null) & ~mResettingSystemUiFlags Loading
services/core/java/com/android/server/wm/InsetsControlTarget.java 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.wm; /** * Generalization of an object that can control insets state. */ interface InsetsControlTarget { void notifyInsetsControlChanged(); }