summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jerome Gaillard <jgaillard@google.com> 2020-06-12 14:58:19 +0000
committer Ryan Mitchell <rtmitchell@google.com> 2020-06-12 22:45:20 +0000
commit2a38a35622cedac5ac2d6c228d898f9e9ecee76e (patch)
tree5074c58d15c1a715f64d633d5e9de0d345f26b0a
parent460dabda46d543b6db9c963bd4f85b89575e08d8 (diff)
Revert "Remove IME surface when occured in multi-window mode"
This reverts commit 460dabda46d543b6db9c963bd4f85b89575e08d8. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testTopPositionSwitchOnTapTimeoutDifferentProcess&testClass=android.server.wm.lifecycle.ActivityLifecycleTopResumedStateTests&atpConfigName=cts%2Fframework%2Fgce-presubmit-wm-cloud-tf-3&testModule=CtsWindowManagerDeviceTestCases&fkbb=6585261&lkbb=6585728&lkgb=6581565&testResults=true&badBuildCount=13&branch=git_rvc-qpr-dev-plus-aosp&target=aosp_cf_x86_phone-userdebug, bug b/158836294 Bug: 158836294 Change-Id: Iec015564030658845a5b1262c23c5b72570af9cf
-rw-r--r--core/java/com/android/internal/view/IInputMethodManager.aidl2
-rw-r--r--packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java24
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java16
-rw-r--r--services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java6
4 files changed, 3 insertions, 45 deletions
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index d22f94213338..3f03f2a3e754 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -71,6 +71,4 @@ interface IInputMethodManager {
void reportActivityView(in IInputMethodClient parentClient, int childDisplayId,
in float[] matrixValues);
-
- void removeImeSurface();
}
diff --git a/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java b/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
index 7b114525adcd..32e3a7fc032e 100644
--- a/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
+++ b/packages/SystemUI/src/com/android/systemui/wm/DisplayImeController.java
@@ -19,13 +19,11 @@ package com.android.systemui.wm;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
-import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Handler;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Slog;
import android.util.SparseArray;
import android.view.IDisplayWindowInsetsController;
@@ -38,7 +36,6 @@ import android.view.WindowInsets;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
-import com.android.internal.view.IInputMethodManager;
import com.android.systemui.TransactionPool;
import com.android.systemui.dagger.qualifiers.Main;
@@ -355,16 +352,6 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
dispatchEndPositioning(mDisplayId, mCancelled, t);
if (mAnimationDirection == DIRECTION_HIDE && !mCancelled) {
t.hide(mImeSourceControl.getLeash());
- final IInputMethodManager imms = getImms();
- if (imms != null) {
- try {
- // Remove the IME surface to make the insets invisible for
- // non-client controlled insets.
- imms.removeImeSurface();
- } catch (RemoteException e) {
- Slog.e(TAG, "Failed to remove IME surface.", e);
- }
- }
}
t.apply();
mTransactionPool.release(t);
@@ -395,9 +382,9 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
* Called when the IME position is starting to animate.
*
* @param hiddenTop The y position of the top of the IME surface when it is hidden.
- * @param shownTop The y position of the top of the IME surface when it is shown.
- * @param showing {@code true} when we are animating from hidden to shown, {@code false}
- * when animating from shown to hidden.
+ * @param shownTop The y position of the top of the IME surface when it is shown.
+ * @param showing {@code true} when we are animating from hidden to shown, {@code false}
+ * when animating from shown to hidden.
*/
default void onImeStartPositioning(int displayId, int hiddenTop, int shownTop,
boolean showing, SurfaceControl.Transaction t) {}
@@ -419,9 +406,4 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
default void onImeEndPositioning(int displayId, boolean cancel,
SurfaceControl.Transaction t) {}
}
-
- public IInputMethodManager getImms() {
- return IInputMethodManager.Stub.asInterface(
- ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
- }
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index c604a9cf7021..a498e3867c05 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -207,7 +207,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
static final int MSG_HIDE_CURRENT_INPUT_METHOD = 1035;
static final int MSG_INITIALIZE_IME = 1040;
static final int MSG_CREATE_SESSION = 1050;
- static final int MSG_REMOVE_IME_SURFACE = 1060;
static final int MSG_START_INPUT = 2000;
@@ -3937,12 +3936,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
}
- @Override
- public void removeImeSurface() {
- mContext.enforceCallingPermission(Manifest.permission.INTERNAL_SYSTEM_WINDOW, null);
- mHandler.sendMessage(mHandler.obtainMessage(MSG_REMOVE_IME_SURFACE));
- }
-
@BinderThread
private void notifyUserAction(@NonNull IBinder token) {
if (DEBUG) {
@@ -4213,15 +4206,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
args.recycle();
return true;
}
- case MSG_REMOVE_IME_SURFACE: {
- try {
- if (mEnabledSession != null && mEnabledSession.session != null) {
- mEnabledSession.session.removeImeSurface();
- }
- } catch (RemoteException e) {
- }
- return true;
- }
// ---------------------------------------------------------
case MSG_START_INPUT: {
diff --git a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
index d025b0f4ece5..2129e9bd34f3 100644
--- a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
@@ -1462,12 +1462,6 @@ public final class MultiClientInputMethodManagerService {
@BinderThread
@Override
- public void removeImeSurface() {
- reportNotSupported();
- }
-
- @BinderThread
- @Override
public boolean showSoftInput(
IInputMethodClient client, IBinder token, int flags,
ResultReceiver resultReceiver) {