Loading services/core/java/com/android/server/wm/InsetsPolicy.java +17 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,23 @@ class InsetsPolicy { return adjustVisibilityForTransientTypes(originalState); } /** * @param type the internal type of the insets. * @return {@code true} if the given type is controllable, {@code false} otherwise. */ static boolean isInsetsTypeControllable(@InternalInsetsType int type) { switch (type) { case ITYPE_STATUS_BAR: case ITYPE_NAVIGATION_BAR: case ITYPE_IME: case ITYPE_CLIMATE_BAR: case ITYPE_EXTRA_NAVIGATION_BAR: return true; default: return false; } } private static @InternalInsetsType int getInsetsTypeForLayoutParams( WindowManager.LayoutParams attrs) { @WindowManager.LayoutParams.WindowType int type = attrs.type; Loading services/core/java/com/android/server/wm/InsetsSourceProvider.java +1 −16 Original line number Diff line number Diff line Loading @@ -16,11 +16,7 @@ package com.android.server.wm; import static android.view.InsetsState.ITYPE_CLIMATE_BAR; import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR; import static android.view.InsetsState.ITYPE_IME; import static android.view.InsetsState.ITYPE_NAVIGATION_BAR; import static android.view.InsetsState.ITYPE_STATUS_BAR; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_WINDOW_INSETS; import static com.android.server.wm.InsetsSourceProviderProto.CAPTURED_LEASH; Loading Loading @@ -128,18 +124,7 @@ abstract class InsetsSourceProvider { mStateController = stateController; mFakeControl = new InsetsSourceControl( source.getType(), null /* leash */, new Point(), Insets.NONE); switch (source.getType()) { case ITYPE_STATUS_BAR: case ITYPE_NAVIGATION_BAR: case ITYPE_IME: case ITYPE_CLIMATE_BAR: case ITYPE_EXTRA_NAVIGATION_BAR: mControllable = true; break; default: mControllable = false; } mControllable = InsetsPolicy.isInsetsTypeControllable(source.getType()); } InsetsSource getSource() { Loading Loading
services/core/java/com/android/server/wm/InsetsPolicy.java +17 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,23 @@ class InsetsPolicy { return adjustVisibilityForTransientTypes(originalState); } /** * @param type the internal type of the insets. * @return {@code true} if the given type is controllable, {@code false} otherwise. */ static boolean isInsetsTypeControllable(@InternalInsetsType int type) { switch (type) { case ITYPE_STATUS_BAR: case ITYPE_NAVIGATION_BAR: case ITYPE_IME: case ITYPE_CLIMATE_BAR: case ITYPE_EXTRA_NAVIGATION_BAR: return true; default: return false; } } private static @InternalInsetsType int getInsetsTypeForLayoutParams( WindowManager.LayoutParams attrs) { @WindowManager.LayoutParams.WindowType int type = attrs.type; Loading
services/core/java/com/android/server/wm/InsetsSourceProvider.java +1 −16 Original line number Diff line number Diff line Loading @@ -16,11 +16,7 @@ package com.android.server.wm; import static android.view.InsetsState.ITYPE_CLIMATE_BAR; import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR; import static android.view.InsetsState.ITYPE_IME; import static android.view.InsetsState.ITYPE_NAVIGATION_BAR; import static android.view.InsetsState.ITYPE_STATUS_BAR; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_WINDOW_INSETS; import static com.android.server.wm.InsetsSourceProviderProto.CAPTURED_LEASH; Loading Loading @@ -128,18 +124,7 @@ abstract class InsetsSourceProvider { mStateController = stateController; mFakeControl = new InsetsSourceControl( source.getType(), null /* leash */, new Point(), Insets.NONE); switch (source.getType()) { case ITYPE_STATUS_BAR: case ITYPE_NAVIGATION_BAR: case ITYPE_IME: case ITYPE_CLIMATE_BAR: case ITYPE_EXTRA_NAVIGATION_BAR: mControllable = true; break; default: mControllable = false; } mControllable = InsetsPolicy.isInsetsTypeControllable(source.getType()); } InsetsSource getSource() { Loading