Merge "Revert "Remove IME surface when occured in multi-window mode"" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a840c1f3ea
@@ -71,6 +71,4 @@ interface IInputMethodManager {
|
|||||||
|
|
||||||
void reportActivityView(in IInputMethodClient parentClient, int childDisplayId,
|
void reportActivityView(in IInputMethodClient parentClient, int childDisplayId,
|
||||||
in float[] matrixValues);
|
in float[] matrixValues);
|
||||||
|
|
||||||
void removeImeSurface();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,13 +19,11 @@ package com.android.systemui.wm;
|
|||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.animation.AnimatorListenerAdapter;
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Point;
|
import android.graphics.Point;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.view.IDisplayWindowInsetsController;
|
import android.view.IDisplayWindowInsetsController;
|
||||||
@@ -38,7 +36,6 @@ import android.view.WindowInsets;
|
|||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
import android.view.animation.PathInterpolator;
|
import android.view.animation.PathInterpolator;
|
||||||
|
|
||||||
import com.android.internal.view.IInputMethodManager;
|
|
||||||
import com.android.systemui.TransactionPool;
|
import com.android.systemui.TransactionPool;
|
||||||
import com.android.systemui.dagger.qualifiers.Main;
|
import com.android.systemui.dagger.qualifiers.Main;
|
||||||
|
|
||||||
@@ -355,16 +352,6 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
|
|||||||
dispatchEndPositioning(mDisplayId, mCancelled, t);
|
dispatchEndPositioning(mDisplayId, mCancelled, t);
|
||||||
if (mAnimationDirection == DIRECTION_HIDE && !mCancelled) {
|
if (mAnimationDirection == DIRECTION_HIDE && !mCancelled) {
|
||||||
t.hide(mImeSourceControl.getLeash());
|
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();
|
t.apply();
|
||||||
mTransactionPool.release(t);
|
mTransactionPool.release(t);
|
||||||
@@ -395,9 +382,9 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
|
|||||||
* Called when the IME position is starting to animate.
|
* 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 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 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}
|
* @param showing {@code true} when we are animating from hidden to shown, {@code false}
|
||||||
* when animating from shown to hidden.
|
* when animating from shown to hidden.
|
||||||
*/
|
*/
|
||||||
default void onImeStartPositioning(int displayId, int hiddenTop, int shownTop,
|
default void onImeStartPositioning(int displayId, int hiddenTop, int shownTop,
|
||||||
boolean showing, SurfaceControl.Transaction t) {}
|
boolean showing, SurfaceControl.Transaction t) {}
|
||||||
@@ -419,9 +406,4 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
|
|||||||
default void onImeEndPositioning(int displayId, boolean cancel,
|
default void onImeEndPositioning(int displayId, boolean cancel,
|
||||||
SurfaceControl.Transaction t) {}
|
SurfaceControl.Transaction t) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IInputMethodManager getImms() {
|
|
||||||
return IInputMethodManager.Stub.asInterface(
|
|
||||||
ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
static final int MSG_HIDE_CURRENT_INPUT_METHOD = 1035;
|
static final int MSG_HIDE_CURRENT_INPUT_METHOD = 1035;
|
||||||
static final int MSG_INITIALIZE_IME = 1040;
|
static final int MSG_INITIALIZE_IME = 1040;
|
||||||
static final int MSG_CREATE_SESSION = 1050;
|
static final int MSG_CREATE_SESSION = 1050;
|
||||||
static final int MSG_REMOVE_IME_SURFACE = 1060;
|
|
||||||
|
|
||||||
static final int MSG_START_INPUT = 2000;
|
static final int MSG_START_INPUT = 2000;
|
||||||
|
|
||||||
@@ -3947,12 +3946,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
|
@BinderThread
|
||||||
private void notifyUserAction(@NonNull IBinder token) {
|
private void notifyUserAction(@NonNull IBinder token) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
@@ -4223,15 +4216,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
args.recycle();
|
args.recycle();
|
||||||
return true;
|
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: {
|
case MSG_START_INPUT: {
|
||||||
|
|||||||
@@ -1460,12 +1460,6 @@ public final class MultiClientInputMethodManagerService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@BinderThread
|
|
||||||
@Override
|
|
||||||
public void removeImeSurface() {
|
|
||||||
reportNotSupported();
|
|
||||||
}
|
|
||||||
|
|
||||||
@BinderThread
|
@BinderThread
|
||||||
@Override
|
@Override
|
||||||
public boolean showSoftInput(
|
public boolean showSoftInput(
|
||||||
|
|||||||
Reference in New Issue
Block a user