* Informs the system that the primary split-screen stack should be minimized.
*/
void setSplitScreenMinimized(boolean minimized);
+
+ /**
+ * Hides the current input method if one is showing.
+ */
+ void hideCurrentInputMethod();
}
}
}
+ public void hideCurrentInputMethod() {
+ try {
+ mAnimationController.hideCurrentInputMethod();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to set hide input method", e);
+ }
+ }
+
public void finish(boolean toHome) {
try {
mAnimationController.finish(toHome);
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
import android.view.SurfaceControl.Transaction;
+import android.view.inputmethod.InputMethodManagerInternal;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.LocalServices;
import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
import com.android.server.wm.utils.InsetUtils;
import com.google.android.collect.Sets;
Binder.restoreCallingIdentity(token);
}
}
+
+ @Override
+ public void hideCurrentInputMethod() {
+ final long token = Binder.clearCallingIdentity();
+ try {
+ final InputMethodManagerInternal inputMethodManagerInternal =
+ LocalServices.getService(InputMethodManagerInternal.class);
+ if (inputMethodManagerInternal != null) {
+ inputMethodManagerInternal.hideCurrentInputMethod();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
};
/**