Loading core/java/android/view/ImeInsetsSourceConsumer.java +0 −4 Original line number Diff line number Diff line Loading @@ -50,10 +50,6 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { super(ITYPE_IME, state, transactionSupplier, controller); } public void applyImeVisibility(boolean setVisible) { mController.applyImeVisibility(setVisible); } @Override public void onWindowFocusGained() { super.onWindowFocusGained(); Loading core/java/android/view/InsetsController.java +2 −14 Original line number Diff line number Diff line Loading @@ -920,7 +920,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation hide(types, false /* fromIme */); } void hide(@InsetsType int types, boolean fromIme) { @VisibleForTesting public void hide(@InsetsType int types, boolean fromIme) { if (fromIme) { ImeTracing.getInstance().triggerClientDump("InsetsController#hide", mHost.getInputMethodManager(), null /* icProto */); Loading Loading @@ -1312,19 +1313,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation getSourceConsumer(ITYPE_IME).onWindowFocusLost(); } /** * Used by {@link ImeInsetsSourceConsumer} when IME decides to be shown/hidden. * @hide */ @VisibleForTesting public void applyImeVisibility(boolean setVisible) { if (setVisible) { show(Type.IME, true /* fromIme */); } else { hide(Type.IME); } } @VisibleForTesting public @AnimationType int getAnimationType(@InternalInsetsType int type) { for (int i = mRunningAnimations.size() - 1; i >= 0; i--) { Loading core/java/android/view/inputmethod/InputMethodManager.java +0 −18 Original line number Diff line number Diff line Loading @@ -511,7 +511,6 @@ public final class InputMethodManager { static final int MSG_TIMEOUT_INPUT_EVENT = 6; static final int MSG_FLUSH_INPUT_EVENT = 7; static final int MSG_REPORT_FULLSCREEN_MODE = 10; static final int MSG_APPLY_IME_VISIBILITY = 20; static final int MSG_UPDATE_ACTIVITY_VIEW_TO_SCREEN_MATRIX = 30; private static boolean isAutofillUIShowing(View servedView) { Loading Loading @@ -985,17 +984,6 @@ public final class InputMethodManager { } return; } case MSG_APPLY_IME_VISIBILITY: { synchronized (mH) { if (mImeInsetsConsumer != null) { ImeTracing.getInstance().triggerClientDump( "ImeInsetsSourceConsumer#applyImeVisibility", InputMethodManager.this, null /* icProto */); mImeInsetsConsumer.applyImeVisibility(msg.arg1 != 0); } } return; } case MSG_UPDATE_ACTIVITY_VIEW_TO_SCREEN_MATRIX: { final float[] matrixValues = (float[]) msg.obj; final int bindSequence = msg.arg1; Loading Loading @@ -1089,12 +1077,6 @@ public final class InputMethodManager { .sendToTarget(); } @Override public void applyImeVisibility(boolean setVisible) { mH.obtainMessage(MSG_APPLY_IME_VISIBILITY, setVisible ? 1 : 0, 0) .sendToTarget(); } @Override public void updateActivityViewToScreenMatrix(int bindSequence, float[] matrixValues) { mH.obtainMessage(MSG_UPDATE_ACTIVITY_VIEW_TO_SCREEN_MATRIX, bindSequence, 0, Loading core/java/com/android/internal/view/IInputMethodClient.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ oneway interface IInputMethodClient { void setActive(boolean active, boolean fullscreen, boolean reportToImeController); void scheduleStartInputIfNecessary(boolean fullscreen); void reportFullscreenMode(boolean fullscreen); void applyImeVisibility(boolean setVisible); void updateActivityViewToScreenMatrix(int bindSequence, in float[] matrixValues); void setImeTraceEnabled(boolean enabled); } core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -98,12 +98,12 @@ public class ImeInsetsSourceConsumerTest { InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { // test if setVisibility can show IME mImeConsumer.onWindowFocusGained(); mImeConsumer.applyImeVisibility(true); mController.show(WindowInsets.Type.ime(), true /* fromIme */); mController.cancelExistingAnimations(); assertTrue(mController.getSourceConsumer(ime.getType()).isRequestedVisible()); // test if setVisibility can hide IME mImeConsumer.applyImeVisibility(false); mController.hide(WindowInsets.Type.ime(), true /* fromIme */); mController.cancelExistingAnimations(); assertFalse(mController.getSourceConsumer(ime.getType()).isRequestedVisible()); }); Loading @@ -117,7 +117,7 @@ public class ImeInsetsSourceConsumerTest { InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { // Request IME visible before control is available. mImeConsumer.onWindowFocusGained(); mImeConsumer.applyImeVisibility(true /* setVisible */); mController.show(WindowInsets.Type.ime(), true /* fromIme */); // set control and verify visibility is applied. InsetsSourceControl control = Loading @@ -136,7 +136,7 @@ public class ImeInsetsSourceConsumerTest { InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { // Request IME visible before control is available. mImeConsumer.onWindowFocusGained(); mImeConsumer.applyImeVisibility(true /* setVisible */); mController.show(WindowInsets.Type.ime(), true /* fromIme */); // set control and verify visibility is applied. InsetsSourceControl control = Mockito.spy( Loading Loading
core/java/android/view/ImeInsetsSourceConsumer.java +0 −4 Original line number Diff line number Diff line Loading @@ -50,10 +50,6 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { super(ITYPE_IME, state, transactionSupplier, controller); } public void applyImeVisibility(boolean setVisible) { mController.applyImeVisibility(setVisible); } @Override public void onWindowFocusGained() { super.onWindowFocusGained(); Loading
core/java/android/view/InsetsController.java +2 −14 Original line number Diff line number Diff line Loading @@ -920,7 +920,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation hide(types, false /* fromIme */); } void hide(@InsetsType int types, boolean fromIme) { @VisibleForTesting public void hide(@InsetsType int types, boolean fromIme) { if (fromIme) { ImeTracing.getInstance().triggerClientDump("InsetsController#hide", mHost.getInputMethodManager(), null /* icProto */); Loading Loading @@ -1312,19 +1313,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation getSourceConsumer(ITYPE_IME).onWindowFocusLost(); } /** * Used by {@link ImeInsetsSourceConsumer} when IME decides to be shown/hidden. * @hide */ @VisibleForTesting public void applyImeVisibility(boolean setVisible) { if (setVisible) { show(Type.IME, true /* fromIme */); } else { hide(Type.IME); } } @VisibleForTesting public @AnimationType int getAnimationType(@InternalInsetsType int type) { for (int i = mRunningAnimations.size() - 1; i >= 0; i--) { Loading
core/java/android/view/inputmethod/InputMethodManager.java +0 −18 Original line number Diff line number Diff line Loading @@ -511,7 +511,6 @@ public final class InputMethodManager { static final int MSG_TIMEOUT_INPUT_EVENT = 6; static final int MSG_FLUSH_INPUT_EVENT = 7; static final int MSG_REPORT_FULLSCREEN_MODE = 10; static final int MSG_APPLY_IME_VISIBILITY = 20; static final int MSG_UPDATE_ACTIVITY_VIEW_TO_SCREEN_MATRIX = 30; private static boolean isAutofillUIShowing(View servedView) { Loading Loading @@ -985,17 +984,6 @@ public final class InputMethodManager { } return; } case MSG_APPLY_IME_VISIBILITY: { synchronized (mH) { if (mImeInsetsConsumer != null) { ImeTracing.getInstance().triggerClientDump( "ImeInsetsSourceConsumer#applyImeVisibility", InputMethodManager.this, null /* icProto */); mImeInsetsConsumer.applyImeVisibility(msg.arg1 != 0); } } return; } case MSG_UPDATE_ACTIVITY_VIEW_TO_SCREEN_MATRIX: { final float[] matrixValues = (float[]) msg.obj; final int bindSequence = msg.arg1; Loading Loading @@ -1089,12 +1077,6 @@ public final class InputMethodManager { .sendToTarget(); } @Override public void applyImeVisibility(boolean setVisible) { mH.obtainMessage(MSG_APPLY_IME_VISIBILITY, setVisible ? 1 : 0, 0) .sendToTarget(); } @Override public void updateActivityViewToScreenMatrix(int bindSequence, float[] matrixValues) { mH.obtainMessage(MSG_UPDATE_ACTIVITY_VIEW_TO_SCREEN_MATRIX, bindSequence, 0, Loading
core/java/com/android/internal/view/IInputMethodClient.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ oneway interface IInputMethodClient { void setActive(boolean active, boolean fullscreen, boolean reportToImeController); void scheduleStartInputIfNecessary(boolean fullscreen); void reportFullscreenMode(boolean fullscreen); void applyImeVisibility(boolean setVisible); void updateActivityViewToScreenMatrix(int bindSequence, in float[] matrixValues); void setImeTraceEnabled(boolean enabled); }
core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -98,12 +98,12 @@ public class ImeInsetsSourceConsumerTest { InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { // test if setVisibility can show IME mImeConsumer.onWindowFocusGained(); mImeConsumer.applyImeVisibility(true); mController.show(WindowInsets.Type.ime(), true /* fromIme */); mController.cancelExistingAnimations(); assertTrue(mController.getSourceConsumer(ime.getType()).isRequestedVisible()); // test if setVisibility can hide IME mImeConsumer.applyImeVisibility(false); mController.hide(WindowInsets.Type.ime(), true /* fromIme */); mController.cancelExistingAnimations(); assertFalse(mController.getSourceConsumer(ime.getType()).isRequestedVisible()); }); Loading @@ -117,7 +117,7 @@ public class ImeInsetsSourceConsumerTest { InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { // Request IME visible before control is available. mImeConsumer.onWindowFocusGained(); mImeConsumer.applyImeVisibility(true /* setVisible */); mController.show(WindowInsets.Type.ime(), true /* fromIme */); // set control and verify visibility is applied. InsetsSourceControl control = Loading @@ -136,7 +136,7 @@ public class ImeInsetsSourceConsumerTest { InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { // Request IME visible before control is available. mImeConsumer.onWindowFocusGained(); mImeConsumer.applyImeVisibility(true /* setVisible */); mController.show(WindowInsets.Type.ime(), true /* fromIme */); // set control and verify visibility is applied. InsetsSourceControl control = Mockito.spy( Loading