Loading core/java/android/inputmethodservice/InputMethodService.java +0 −6 Original line number Diff line number Diff line Loading @@ -603,12 +603,6 @@ public class InputMethodService extends AbstractInputMethodService { @EnabledSince(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public static final long DISALLOW_INPUT_METHOD_INTERFACE_OVERRIDE = 148086656L; /** * Enable the logic to allow hiding the IME caption bar ("fake" IME navigation bar). * @hide */ public static final boolean ENABLE_HIDE_IME_CAPTION_BAR = true; LayoutInflater mInflater; TypedArray mThemeAttrs; @UnsupportedAppUsage Loading core/java/android/inputmethodservice/NavigationBarController.java +16 −22 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.inputmethodservice; import static android.inputmethodservice.InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR; import static android.view.WindowInsets.Type.captionBar; import static android.view.WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS; Loading Loading @@ -260,16 +259,16 @@ final class NavigationBarController { setIconTintInternal(calculateTargetDarkIntensity(mAppearance, mDrawLegacyNavigationBarBackground)); if (ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setOnApplyWindowInsetsListener((view, insets) -> { if (mNavigationBarFrame != null) { // The IME window receives IME-specific captionBar insets, representing the // IME navigation bar. boolean visible = insets.isVisible(captionBar()); mNavigationBarFrame.setVisibility(visible ? View.VISIBLE : View.GONE); } return view.onApplyWindowInsets(insets); }); } } private void uninstallNavigationBarFrameIfNecessary() { if (mNavigationBarFrame == null) { Loading @@ -279,9 +278,7 @@ final class NavigationBarController { if (parent instanceof ViewGroup) { ((ViewGroup) parent).removeView(mNavigationBarFrame); } if (ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setOnApplyWindowInsetsListener(null); } mNavigationBarFrame = null; } Loading Loading @@ -474,9 +471,6 @@ final class NavigationBarController { decor.bringChildToFront(mNavigationBarFrame); } } if (!ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setVisibility(View.VISIBLE); } } } Loading @@ -497,10 +491,8 @@ final class NavigationBarController { mShouldShowImeSwitcherWhenImeIsShown; mShouldShowImeSwitcherWhenImeIsShown = shouldShowImeSwitcherWhenImeIsShown; if (ENABLE_HIDE_IME_CAPTION_BAR) { mService.mWindow.getWindow().getDecorView().getWindowInsetsController() .setImeCaptionBarInsetsHeight(getImeCaptionBarHeight()); } .setImeCaptionBarInsetsHeight(getImeCaptionBarHeight(imeDrawsImeNavBar)); if (imeDrawsImeNavBar) { installNavigationBarFrameIfNecessary(); Loading Loading @@ -608,9 +600,11 @@ final class NavigationBarController { /** * Returns the height of the IME caption bar if this should be shown, or {@code 0} instead. * * @param imeDrawsImeNavBar whether the IME should show the IME navigation bar. */ private int getImeCaptionBarHeight() { return mImeDrawsImeNavBar private int getImeCaptionBarHeight(boolean imeDrawsImeNavBar) { return imeDrawsImeNavBar ? mService.getResources().getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_frame_height) : 0; Loading core/java/android/view/InsetsController.java +0 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.view; import static android.inputmethodservice.InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR; import static android.os.Trace.TRACE_TAG_VIEW; import static android.view.InsetsControllerProto.CONTROL; import static android.view.InsetsControllerProto.STATE; Loading Loading @@ -2148,9 +2147,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public void setImeCaptionBarInsetsHeight(int height) { if (!ENABLE_HIDE_IME_CAPTION_BAR) { return; } Rect newFrame = new Rect(mFrame.left, mFrame.bottom - height, mFrame.right, mFrame.bottom); InsetsSource source = mState.peekSource(ID_IME_CAPTION_BAR); if (mImeCaptionBarInsetsHeight != height Loading packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java +0 −7 Original line number Diff line number Diff line Loading @@ -25,12 +25,10 @@ import static android.app.StatusBarManager.WindowType; import static android.app.StatusBarManager.WindowVisibleState; import static android.app.StatusBarManager.windowStateToString; import static android.app.WindowConfiguration.ROTATION_UNDEFINED; import static android.inputmethodservice.InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR; import static android.view.InsetsSource.FLAG_SUPPRESS_SCRIM; import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON; import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL; Loading Loading @@ -1836,11 +1834,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements private InsetsFrameProvider[] getInsetsFrameProvider(int insetsHeight, Context userContext) { final InsetsFrameProvider navBarProvider = new InsetsFrameProvider(mInsetsSourceOwner, 0, WindowInsets.Type.navigationBars()); if (!ENABLE_HIDE_IME_CAPTION_BAR) { navBarProvider.setInsetsSizeOverrides(new InsetsFrameProvider.InsetsSizeOverride[] { new InsetsFrameProvider.InsetsSizeOverride(TYPE_INPUT_METHOD, null) }); } if (insetsHeight != -1 && !mEdgeBackGestureHandler.isButtonForcedVisible()) { navBarProvider.setInsetsSize(Insets.of(0, 0, 0, insetsHeight)); } Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -6078,8 +6078,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. p.println(" mSystemReady=" + mSystemReady); p.println(" mInteractive=" + mIsInteractive); p.println(" mConcurrentMultiUserModeEnabled=" + mConcurrentMultiUserModeEnabled); p.println(" ENABLE_HIDE_IME_CAPTION_BAR=" + InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR); final int currentImeUserId; synchronized (ImfLock.class) { currentImeUserId = mCurrentImeUserId; Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +0 −6 Original line number Diff line number Diff line Loading @@ -603,12 +603,6 @@ public class InputMethodService extends AbstractInputMethodService { @EnabledSince(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) public static final long DISALLOW_INPUT_METHOD_INTERFACE_OVERRIDE = 148086656L; /** * Enable the logic to allow hiding the IME caption bar ("fake" IME navigation bar). * @hide */ public static final boolean ENABLE_HIDE_IME_CAPTION_BAR = true; LayoutInflater mInflater; TypedArray mThemeAttrs; @UnsupportedAppUsage Loading
core/java/android/inputmethodservice/NavigationBarController.java +16 −22 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.inputmethodservice; import static android.inputmethodservice.InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR; import static android.view.WindowInsets.Type.captionBar; import static android.view.WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS; Loading Loading @@ -260,16 +259,16 @@ final class NavigationBarController { setIconTintInternal(calculateTargetDarkIntensity(mAppearance, mDrawLegacyNavigationBarBackground)); if (ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setOnApplyWindowInsetsListener((view, insets) -> { if (mNavigationBarFrame != null) { // The IME window receives IME-specific captionBar insets, representing the // IME navigation bar. boolean visible = insets.isVisible(captionBar()); mNavigationBarFrame.setVisibility(visible ? View.VISIBLE : View.GONE); } return view.onApplyWindowInsets(insets); }); } } private void uninstallNavigationBarFrameIfNecessary() { if (mNavigationBarFrame == null) { Loading @@ -279,9 +278,7 @@ final class NavigationBarController { if (parent instanceof ViewGroup) { ((ViewGroup) parent).removeView(mNavigationBarFrame); } if (ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setOnApplyWindowInsetsListener(null); } mNavigationBarFrame = null; } Loading Loading @@ -474,9 +471,6 @@ final class NavigationBarController { decor.bringChildToFront(mNavigationBarFrame); } } if (!ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setVisibility(View.VISIBLE); } } } Loading @@ -497,10 +491,8 @@ final class NavigationBarController { mShouldShowImeSwitcherWhenImeIsShown; mShouldShowImeSwitcherWhenImeIsShown = shouldShowImeSwitcherWhenImeIsShown; if (ENABLE_HIDE_IME_CAPTION_BAR) { mService.mWindow.getWindow().getDecorView().getWindowInsetsController() .setImeCaptionBarInsetsHeight(getImeCaptionBarHeight()); } .setImeCaptionBarInsetsHeight(getImeCaptionBarHeight(imeDrawsImeNavBar)); if (imeDrawsImeNavBar) { installNavigationBarFrameIfNecessary(); Loading Loading @@ -608,9 +600,11 @@ final class NavigationBarController { /** * Returns the height of the IME caption bar if this should be shown, or {@code 0} instead. * * @param imeDrawsImeNavBar whether the IME should show the IME navigation bar. */ private int getImeCaptionBarHeight() { return mImeDrawsImeNavBar private int getImeCaptionBarHeight(boolean imeDrawsImeNavBar) { return imeDrawsImeNavBar ? mService.getResources().getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_frame_height) : 0; Loading
core/java/android/view/InsetsController.java +0 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.view; import static android.inputmethodservice.InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR; import static android.os.Trace.TRACE_TAG_VIEW; import static android.view.InsetsControllerProto.CONTROL; import static android.view.InsetsControllerProto.STATE; Loading Loading @@ -2148,9 +2147,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation @Override public void setImeCaptionBarInsetsHeight(int height) { if (!ENABLE_HIDE_IME_CAPTION_BAR) { return; } Rect newFrame = new Rect(mFrame.left, mFrame.bottom - height, mFrame.right, mFrame.bottom); InsetsSource source = mState.peekSource(ID_IME_CAPTION_BAR); if (mImeCaptionBarInsetsHeight != height Loading
packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java +0 −7 Original line number Diff line number Diff line Loading @@ -25,12 +25,10 @@ import static android.app.StatusBarManager.WindowType; import static android.app.StatusBarManager.WindowVisibleState; import static android.app.StatusBarManager.windowStateToString; import static android.app.WindowConfiguration.ROTATION_UNDEFINED; import static android.inputmethodservice.InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR; import static android.view.InsetsSource.FLAG_SUPPRESS_SCRIM; import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON; import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL; Loading Loading @@ -1836,11 +1834,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements private InsetsFrameProvider[] getInsetsFrameProvider(int insetsHeight, Context userContext) { final InsetsFrameProvider navBarProvider = new InsetsFrameProvider(mInsetsSourceOwner, 0, WindowInsets.Type.navigationBars()); if (!ENABLE_HIDE_IME_CAPTION_BAR) { navBarProvider.setInsetsSizeOverrides(new InsetsFrameProvider.InsetsSizeOverride[] { new InsetsFrameProvider.InsetsSizeOverride(TYPE_INPUT_METHOD, null) }); } if (insetsHeight != -1 && !mEdgeBackGestureHandler.isButtonForcedVisible()) { navBarProvider.setInsetsSize(Insets.of(0, 0, 0, insetsHeight)); } Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -6078,8 +6078,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. p.println(" mSystemReady=" + mSystemReady); p.println(" mInteractive=" + mIsInteractive); p.println(" mConcurrentMultiUserModeEnabled=" + mConcurrentMultiUserModeEnabled); p.println(" ENABLE_HIDE_IME_CAPTION_BAR=" + InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR); final int currentImeUserId; synchronized (ImfLock.class) { currentImeUserId = mCurrentImeUserId; Loading