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

Commit 400822e6 authored by Peter Hsiang's avatar Peter Hsiang Committed by Joey Rizzoli
Browse files

Fix PacketKeepalive.stop() crash

If the keepalive stop() function is called when the mSlot number is
not yet setup, the conversion from null to integer will crash.
This patch fixes it by adding the error checking.

Change-Id: I7fff1010786896b053abdd6549dd29f09893b017
parent 217b8fcd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1543,6 +1543,9 @@ public class ConnectivityManager {
        }

        public void stop() {
            if (mSlot == null) {
                return;
            }
            try {
                mService.stopKeepalive(mNetwork, mSlot);
            } catch (RemoteException e) {