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

Commit 06487a58 authored by satok's avatar satok
Browse files

Add a functionarity for showing / hiding IME button on the system bar

Bug: 3077030

- IME communicates with status bar directly.

Change-Id: Ic5b6b5b7a2b8ea62372dcc9b9c36d81b9f2db651
parent e12774d4
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1346,6 +1346,7 @@ public class InputMethodService extends AbstractInputMethodService {

        if (!wasVisible) {
            if (DEBUG) Log.v(TAG, "showWindow: showing!");
            mImm.setIMEButtonVisible(mToken, true);
            onWindowShown();
            mWindow.show();
        }
@@ -1364,6 +1365,7 @@ public class InputMethodService extends AbstractInputMethodService {
        if (mWindowVisible) {
            mWindow.hide();
            mWindowVisible = false;
            mImm.setIMEButtonVisible(mToken, false);
            onWindowHidden();
            mWindowWasVisible = false;
        }
+9 −0
Original line number Diff line number Diff line
@@ -518,6 +518,15 @@ public final class InputMethodManager {
        }
    }

    /** @hide */
    public void setIMEButtonVisible(IBinder imeToken, boolean visible) {
        try {
            mService.setIMEButtonVisible(imeToken, visible);
        } catch (RemoteException e) {
            throw new RuntimeException(e);
        }
    }

    /** @hide */
    public void setFullscreenMode(boolean fullScreen) {
        mFullscreenMode = fullScreen;
+1 −0
Original line number Diff line number Diff line
@@ -32,5 +32,6 @@ oneway interface IStatusBar
    void animateCollapse();
    void setLightsOn(boolean on);
    void setMenuKeyVisible(boolean visible);
    void setIMEButtonVisible(boolean visible);
}
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ interface IStatusBarService
    void removeIcon(String slot);
    void setActiveWindowIsFullscreen(boolean fullscreen);
    void setMenuKeyVisible(boolean visible);
    void setIMEButtonVisible(boolean visible);

    // ---- Methods below are for use by the status bar policy services ----
    // You need the STATUS_BAR_SERVICE permission
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ interface IInputMethodManager {
    void hideMySoftInput(in IBinder token, int flags);
    void showMySoftInput(in IBinder token, int flags);
    void updateStatusIcon(in IBinder token, String packageName, int iconId);
    void setIMEButtonVisible(in IBinder token, boolean visible);
    InputMethodSubtype getCurrentInputMethodSubtype();
    
    boolean setInputMethodEnabled(String id, boolean enabled);
Loading