Loading core/java/android/view/InsetsController.java +16 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation */ @Appearance int getSystemBarsAppearance(); default boolean isSystemBarsAppearanceControlled() { return false; } /** * @see WindowInsetsController#setSystemBarsBehavior */ Loading @@ -138,6 +142,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation */ @Behavior int getSystemBarsBehavior(); default boolean isSystemBarsBehaviorControlled() { return false; } /** * Releases a surface and ensure that this is done after {@link #applySurfaceParams} has * finished applying params. Loading Loading @@ -1520,6 +1528,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public @Appearance int getSystemBarsAppearance() { if (!mHost.isSystemBarsAppearanceControlled()) { // We only return the requested appearance, not the implied one. return 0; } return mHost.getSystemBarsAppearance(); } Loading @@ -1544,6 +1556,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public @Behavior int getSystemBarsBehavior() { if (!mHost.isSystemBarsBehaviorControlled()) { // We only return the requested behavior, not the implied one. return 0; } return mHost.getSystemBarsBehavior(); } Loading core/java/android/view/ViewRootInsetsControllerHost.java +10 −8 Original line number Diff line number Diff line Loading @@ -180,13 +180,14 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { @Override public int getSystemBarsAppearance() { if ((mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_APPEARANCE_CONTROLLED) == 0) { // We only return the requested appearance, not the implied one. return 0; } return mViewRoot.mWindowAttributes.insetsFlags.appearance; } @Override public boolean isSystemBarsAppearanceControlled() { return (mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_APPEARANCE_CONTROLLED) != 0; } @Override public void setSystemBarsBehavior(int behavior) { mViewRoot.mWindowAttributes.privateFlags |= PRIVATE_FLAG_BEHAVIOR_CONTROLLED; Loading @@ -199,13 +200,14 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { @Override public int getSystemBarsBehavior() { if ((mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_BEHAVIOR_CONTROLLED) == 0) { // We only return the requested behavior, not the implied one. return 0; } return mViewRoot.mWindowAttributes.insetsFlags.behavior; } @Override public boolean isSystemBarsBehaviorControlled() { return (mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_BEHAVIOR_CONTROLLED) != 0; } @Override public void releaseSurfaceControlFromRt(SurfaceControl surfaceControl) { Loading Loading
core/java/android/view/InsetsController.java +16 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation */ @Appearance int getSystemBarsAppearance(); default boolean isSystemBarsAppearanceControlled() { return false; } /** * @see WindowInsetsController#setSystemBarsBehavior */ Loading @@ -138,6 +142,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation */ @Behavior int getSystemBarsBehavior(); default boolean isSystemBarsBehaviorControlled() { return false; } /** * Releases a surface and ensure that this is done after {@link #applySurfaceParams} has * finished applying params. Loading Loading @@ -1520,6 +1528,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public @Appearance int getSystemBarsAppearance() { if (!mHost.isSystemBarsAppearanceControlled()) { // We only return the requested appearance, not the implied one. return 0; } return mHost.getSystemBarsAppearance(); } Loading @@ -1544,6 +1556,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public @Behavior int getSystemBarsBehavior() { if (!mHost.isSystemBarsBehaviorControlled()) { // We only return the requested behavior, not the implied one. return 0; } return mHost.getSystemBarsBehavior(); } Loading
core/java/android/view/ViewRootInsetsControllerHost.java +10 −8 Original line number Diff line number Diff line Loading @@ -180,13 +180,14 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { @Override public int getSystemBarsAppearance() { if ((mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_APPEARANCE_CONTROLLED) == 0) { // We only return the requested appearance, not the implied one. return 0; } return mViewRoot.mWindowAttributes.insetsFlags.appearance; } @Override public boolean isSystemBarsAppearanceControlled() { return (mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_APPEARANCE_CONTROLLED) != 0; } @Override public void setSystemBarsBehavior(int behavior) { mViewRoot.mWindowAttributes.privateFlags |= PRIVATE_FLAG_BEHAVIOR_CONTROLLED; Loading @@ -199,13 +200,14 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { @Override public int getSystemBarsBehavior() { if ((mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_BEHAVIOR_CONTROLLED) == 0) { // We only return the requested behavior, not the implied one. return 0; } return mViewRoot.mWindowAttributes.insetsFlags.behavior; } @Override public boolean isSystemBarsBehaviorControlled() { return (mViewRoot.mWindowAttributes.privateFlags & PRIVATE_FLAG_BEHAVIOR_CONTROLLED) != 0; } @Override public void releaseSurfaceControlFromRt(SurfaceControl surfaceControl) { Loading