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

Commit 905b674e authored by Hsiaoan Hsu's avatar Hsiaoan Hsu
Browse files

Add a null check for mDefaultQos in DataCallResponse.writeToParcel()

java.lang.NullPointerException:
Attempt to invoke virtual method 'int android.telephony.data.Qos.getType()'
on a null object reference

Bug: 173667436
Test: Basic data and Iwlan/VoLTE handover test.
Change-Id: I6045ac9fa4e757eea74389002d0d443d20459d46
parent 00bca78e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -487,11 +487,15 @@ public final class DataCallResponse implements Parcelable {
        dest.writeInt(mMtuV6);
        dest.writeInt(mHandoverFailureMode);
        dest.writeInt(mPduSessionId);
        if (mDefaultQos != null) {
            if (mDefaultQos.getType() == Qos.QOS_TYPE_EPS) {
                dest.writeParcelable((EpsQos) mDefaultQos, flags);
            } else {
                dest.writeParcelable((NrQos) mDefaultQos, flags);
            }
        } else {
            dest.writeParcelable(null, flags);
        }
        dest.writeList(mQosSessions);
    }