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

Commit bc1e4490 authored by Jay Shrauner's avatar Jay Shrauner
Browse files

Fix NPE when in initConnection()

Make sure mApnSetting is non-null.

Bug:18001406
Change-Id: Ieec252ae7252754c2967ef635085113e3f3ce36d
parent 97dddb84
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1001,9 +1001,8 @@ public final class DataConnection extends StateMachine {
            // Only change apn setting if it isn't set, it will
            // only NOT be set only if we're in DcInactiveState.
            mApnSetting = apnContext.getApnSetting();
        } else if (mApnSetting.canHandleType(apnContext.getApnType())) {
            // All is good.
        } else {
        }
        if (mApnSetting == null || !mApnSetting.canHandleType(apnContext.getApnType())) {
            if (DBG) {
                log("initConnection: incompatible apnSetting in ConnectionParams cp=" + cp
                        + " dc=" + DataConnection.this);