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

Commit 971b48c5 authored by Adrian Roos's avatar Adrian Roos Committed by Automerger Merge Worker
Browse files

IMMS: Make IMMS PendingIntents immutable am: 6842f03c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12684788

Change-Id: Id7f9b0be2eebae29255d5daa0bd50017eb36cc7c
parents 3587150b 6842f03c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1700,7 +1700,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub


        Intent intent = new Intent(ACTION_SHOW_INPUT_METHOD_PICKER)
        Intent intent = new Intent(ACTION_SHOW_INPUT_METHOD_PICKER)
                .setPackage(mContext.getPackageName());
                .setPackage(mContext.getPackageName());
        mImeSwitchPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
        mImeSwitchPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent,
                PendingIntent.FLAG_IMMUTABLE);


        mShowOngoingImeSwitcherForPhones = false;
        mShowOngoingImeSwitcherForPhones = false;


@@ -2528,7 +2529,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        mCurIntent.putExtra(Intent.EXTRA_CLIENT_LABEL,
        mCurIntent.putExtra(Intent.EXTRA_CLIENT_LABEL,
                com.android.internal.R.string.input_method_binding_label);
                com.android.internal.R.string.input_method_binding_label);
        mCurIntent.putExtra(Intent.EXTRA_CLIENT_INTENT, PendingIntent.getActivity(
        mCurIntent.putExtra(Intent.EXTRA_CLIENT_INTENT, PendingIntent.getActivity(
                mContext, 0, new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS), 0));
                mContext, 0, new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS),
                PendingIntent.FLAG_IMMUTABLE));


        if (bindCurrentInputMethodServiceLocked(mCurIntent, this, IME_CONNECTION_BIND_FLAGS)) {
        if (bindCurrentInputMethodServiceLocked(mCurIntent, this, IME_CONNECTION_BIND_FLAGS)) {
            mLastBindTime = SystemClock.uptimeMillis();
            mLastBindTime = SystemClock.uptimeMillis();