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

Commit 921c9d24 authored by Kazuhiro Ondo's avatar Kazuhiro Ondo Committed by Wink Saville
Browse files

Fix occasional phone app crash

bug #4263503

if GsmDCT is just initialized and LTE/GPRS attach happens
before SIM is completely loaded, phone app would crash
as there is no DataConnection associated with ApnContext.

Change-Id: Ie8007c718c3f68a7b3e42154e60e5b25631ec3c8
parent 87ee132a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -569,8 +569,10 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
            if (defaultApnContext != null) {
                if (defaultApnContext.getState() == State.FAILED) {
                    cleanUpConnection(false, defaultApnContext);
                    if (defaultApnContext.getDataConnection() != null) {
                        defaultApnContext.getDataConnection().resetRetryCount();
                    }
                }
                trySetupData(Phone.REASON_GPRS_ATTACHED, Phone.APN_TYPE_DEFAULT);
            }
        }