Loading core/java/android/view/inputmethod/InputMethodManager.java +25 −13 Original line number Original line Diff line number Diff line Loading @@ -1634,16 +1634,22 @@ public final class InputMethodManager { @Deprecated @Deprecated @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123768499) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123768499) public void showSoftInputUnchecked(int flags, ResultReceiver resultReceiver) { public void showSoftInputUnchecked(int flags, ResultReceiver resultReceiver) { synchronized (mH) { try { try { Log.w(TAG, "showSoftInputUnchecked() is a hidden method, which will be removed " Log.w(TAG, "showSoftInputUnchecked() is a hidden method, which will be" + "soon. If you are using android.support.v7.widget.SearchView, please update " + " removed soon. If you are using android.support.v7.widget.SearchView," + "to version 26.0 or newer version."); + " please update to version 26.0 or newer version."); if (mCurRootView == null || mCurRootView.getView() == null) { Log.w(TAG, "No current root view, ignoring showSoftInputUnchecked()"); return; } mService.showSoftInput( mService.showSoftInput( mClient, mCurRootView.getView().getWindowToken(), flags, resultReceiver); mClient, mCurRootView.getView().getWindowToken(), flags, resultReceiver); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } } } } /** /** * Flag for {@link #hideSoftInputFromWindow} and {@link InputMethodService#requestHideSelf(int)} * Flag for {@link #hideSoftInputFromWindow} and {@link InputMethodService#requestHideSelf(int)} Loading Loading @@ -1986,6 +1992,11 @@ public final class InputMethodManager { @UnsupportedAppUsage @UnsupportedAppUsage void closeCurrentInput() { void closeCurrentInput() { synchronized (mH) { if (mCurRootView == null || mCurRootView.getView() == null) { Log.w(TAG, "No current root view, ignoring closeCurrentInput()"); return; } try { try { mService.hideSoftInput( mService.hideSoftInput( mClient, mCurRootView.getView().getWindowToken(), HIDE_NOT_ALWAYS, null); mClient, mCurRootView.getView().getWindowToken(), HIDE_NOT_ALWAYS, null); Loading @@ -1993,6 +2004,7 @@ public final class InputMethodManager { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } } } } /** /** * Register for IME state callbacks and applying visibility in * Register for IME state callbacks and applying visibility in Loading Loading
core/java/android/view/inputmethod/InputMethodManager.java +25 −13 Original line number Original line Diff line number Diff line Loading @@ -1634,16 +1634,22 @@ public final class InputMethodManager { @Deprecated @Deprecated @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123768499) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123768499) public void showSoftInputUnchecked(int flags, ResultReceiver resultReceiver) { public void showSoftInputUnchecked(int flags, ResultReceiver resultReceiver) { synchronized (mH) { try { try { Log.w(TAG, "showSoftInputUnchecked() is a hidden method, which will be removed " Log.w(TAG, "showSoftInputUnchecked() is a hidden method, which will be" + "soon. If you are using android.support.v7.widget.SearchView, please update " + " removed soon. If you are using android.support.v7.widget.SearchView," + "to version 26.0 or newer version."); + " please update to version 26.0 or newer version."); if (mCurRootView == null || mCurRootView.getView() == null) { Log.w(TAG, "No current root view, ignoring showSoftInputUnchecked()"); return; } mService.showSoftInput( mService.showSoftInput( mClient, mCurRootView.getView().getWindowToken(), flags, resultReceiver); mClient, mCurRootView.getView().getWindowToken(), flags, resultReceiver); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } } } } /** /** * Flag for {@link #hideSoftInputFromWindow} and {@link InputMethodService#requestHideSelf(int)} * Flag for {@link #hideSoftInputFromWindow} and {@link InputMethodService#requestHideSelf(int)} Loading Loading @@ -1986,6 +1992,11 @@ public final class InputMethodManager { @UnsupportedAppUsage @UnsupportedAppUsage void closeCurrentInput() { void closeCurrentInput() { synchronized (mH) { if (mCurRootView == null || mCurRootView.getView() == null) { Log.w(TAG, "No current root view, ignoring closeCurrentInput()"); return; } try { try { mService.hideSoftInput( mService.hideSoftInput( mClient, mCurRootView.getView().getWindowToken(), HIDE_NOT_ALWAYS, null); mClient, mCurRootView.getView().getWindowToken(), HIDE_NOT_ALWAYS, null); Loading @@ -1993,6 +2004,7 @@ public final class InputMethodManager { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } } } } /** /** * Register for IME state callbacks and applying visibility in * Register for IME state callbacks and applying visibility in Loading