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

Commit 65171cdf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add null check for received intent." into sc-qpr1-dev am: aadf244e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/15522232

Change-Id: Ic4c0870358e64f1124c5cc6df93782d874fcf619
parents b325b462 aadf244e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import static android.service.carrier.CarrierMessagingService.RECEIVE_OPTIONS_SK
import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.Activity;
import android.app.AppOpsManager;
@@ -1704,10 +1705,15 @@ public abstract class InboundSmsHandler extends StateMachine {

        @Override
        public void onReceive(Context context, Intent intent) {
            if (intent == null) {
                logeWithLocalLog("onReceive: received null intent, faking " + mWaitingForIntent,
                        mInboundSmsTracker.getMessageId());
                return;
            }
            handleAction(intent, true);
        }

        private synchronized void handleAction(Intent intent, boolean onReceive) {
        private synchronized void handleAction(@NonNull Intent intent, boolean onReceive) {
            String action = intent.getAction();
            if (mWaitingForIntent == null || !mWaitingForIntent.getAction().equals(action)) {
                logeWithLocalLog("handleAction: Received " + action + " when expecting "