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

Commit 8a3b4cbb authored by Andrew Sapperstein's avatar Andrew Sapperstein
Browse files

Update input method menu to use proper context.

Was not using the system ui context so it wasn't getting
themed properly.

Bug: 36059431
Fixes: 37788566
Test: built sailfish-userdebug, opened the keyboard by selecting an
    EditText, long-pressed keyboard to switch keyboards, observed
Change-Id: I6ec2381620d1a88c025a0f9228bc58bc11db6bc4
parent d275dc83
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
import android.app.ActivityManagerInternal;
import android.app.ActivityThread;
import android.app.AlertDialog;
import android.app.AppGlobals;
import android.app.AppOpsManager;
@@ -3561,7 +3562,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    private void showInputMethodMenu(boolean showAuxSubtypes) {
        if (DEBUG) Slog.v(TAG, "Show switching menu. showAuxSubtypes=" + showAuxSubtypes);

        final Context context = mContext;
        final boolean isScreenLocked = isScreenLocked();

        final String lastInputMethodId = mSettings.getSelectedInputMethod();
@@ -3609,7 +3609,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                }
            }

            final Context settingsContext = new ContextThemeWrapper(context,
            final Context settingsContext = new ContextThemeWrapper(
                    ActivityThread.currentActivityThread().getSystemUiContext(),
                    com.android.internal.R.style.Theme_DeviceDefault_Settings);

            mDialogBuilder = new AlertDialog.Builder(settingsContext);