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

Commit e8b30803 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Don't allow the apn to decrement below 0.

bug:24106542
Change-Id: Ic749b05845309412804d782b242dc7ecb516c5be
parent b6dfcea9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -334,6 +334,10 @@ public class ApnContext {
            if (mRefCount-- == 1) {
                mDcTracker.setEnabled(mDcTracker.apnTypeToId(mApnType), false);
            }
            if (mRefCount < 0) {
                log.log("ApnContext.decRefCount went to " + mRefCount);
                mRefCount = 0;
            }
        }
    }