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

Commit 7632a807 authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in onDestroy." into lmp-dev

parents 6e31e0f3 619b3c0d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -165,11 +165,13 @@ public abstract class InCallService extends Service {

    @Override
    public boolean onUnbind(Intent intent) {
        if (mPhone != null) {
            Phone oldPhone = mPhone;
            mPhone = null;

            oldPhone.destroy();
            onPhoneDestroyed(oldPhone);
        }
        return false;
    }