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

Commit f4fd6891 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use user-aware context when calling getImeAndSubtypeDisplayName"

parents 44b5c745 f62c0b83
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3157,8 +3157,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
                // Used to load label
                final CharSequence title = mRes.getText(
                        com.android.internal.R.string.select_input_method);
                final int currentUserId = mSettings.getCurrentUserId();
                final Context userAwareContext = mContext.getUserId() == currentUserId
                        ? mContext
                        : mContext.createContextAsUser(UserHandle.of(currentUserId), 0 /* flags */);
                final CharSequence summary = InputMethodUtils.getImeAndSubtypeDisplayName(
                        mContext, imi, mCurrentSubtype);
                        userAwareContext, imi, mCurrentSubtype);
                mImeSwitcherNotification.setContentTitle(title)
                        .setContentText(summary)
                        .setContentIntent(mImeSwitchPendingIntent);