Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4255d362 authored by Ming-Shin Lu's avatar Ming-Shin Lu Committed by Android (Google) Code Review
Browse files

Merge "Update IME window status when KeyguardController#setKeyguardShown" into sc-dev

parents fa29f6f8 75a4e742
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -124,6 +124,11 @@ public abstract class InputMethodManagerInternal {
     */
    public abstract void removeImeSurface();

    /**
     * Updates the IME visibility, back disposition and show IME picker status for SystemUI.
     */
    public abstract void updateImeWindowStatus();

    /**
     * Fake implementation of {@link InputMethodManagerInternal}.  All the methods do nothing.
     */
@@ -175,6 +180,10 @@ public abstract class InputMethodManagerInternal {
                @Override
                public void removeImeSurface() {
                }

                @Override
                public void updateImeWindowStatus() {
                }
            };

    /**
+19 −0
Original line number Diff line number Diff line
@@ -248,6 +248,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    static final int MSG_CREATE_SESSION = 1050;
    static final int MSG_REMOVE_IME_SURFACE = 1060;
    static final int MSG_REMOVE_IME_SURFACE_FROM_WINDOW = 1061;
    static final int MSG_UPDATE_IME_WINDOW_STATUS = 1070;

    static final int MSG_START_INPUT = 2000;

@@ -2940,6 +2941,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        }
    }

    private void updateImeWindowStatus() {
        synchronized (mMethodMap) {
            updateSystemUiLocked();
        }
    }

    void updateSystemUiLocked() {
        updateSystemUiLocked(mImeWindowVis, mBackDisposition);
    }
@@ -4537,6 +4544,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                }
                return true;
            }
            case MSG_UPDATE_IME_WINDOW_STATUS: {
                synchronized (mMethodMap) {
                    updateSystemUiLocked();
                }
                return true;
            }
            // ---------------------------------------------------------

            case MSG_START_INPUT: {
@@ -5202,6 +5215,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        public void removeImeSurface() {
            mService.mHandler.sendMessage(mService.mHandler.obtainMessage(MSG_REMOVE_IME_SURFACE));
        }

        @Override
        public void updateImeWindowStatus() {
            mService.mHandler.sendMessage(
                    mService.mHandler.obtainMessage(MSG_UPDATE_IME_WINDOW_STATUS));
        }
    }

    @BinderThread
+4 −0
Original line number Diff line number Diff line
@@ -241,6 +241,10 @@ public final class MultiClientInputMethodManagerService {
                        public void removeImeSurface() {
                            reportNotSupported();
                        }

                        @Override
                        public void updateImeWindowStatus() {
                        }
                    });
        }

+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import android.util.SparseArray;
import android.util.proto.ProtoOutputStream;

import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.server.inputmethod.InputMethodManagerInternal;
import com.android.server.policy.WindowManagerPolicy;

import java.io.PrintWriter;
@@ -191,6 +192,7 @@ class KeyguardController {
        // state when evaluating visibilities.
        updateKeyguardSleepToken();
        mRootWindowContainer.ensureActivitiesVisible(null, 0, !PRESERVE_WINDOWS);
        InputMethodManagerInternal.get().updateImeWindowStatus();
    }

    /**