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

Commit 610bafc0 authored by Pavel Zhamaitsiak's avatar Pavel Zhamaitsiak Committed by The Android Automerger
Browse files

Make mImsPhone static. DO NOT MERGE ANYWHERE

This change is fixing cases when unnecessary ImsPhone object
was created causing missing updates from IMS stack.

Bug: 20077297
Change-Id: I58d0166767998c16c71fd86bf2b08a90bf80f8ce
parent 47ca8fbf
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -440,10 +440,11 @@ public final class CallManager {
                        phone.getPhoneName() + " " + phone + ")");
            }

            Phone vPhone = basePhone.getImsPhone();
            if (vPhone != null) {
               unregisterPhone(vPhone);
            }
            // ImsPhone is unregistered in PhoneBase.updateImsPhone()
            //Phone vPhone = basePhone.getImsPhone();
            //if (vPhone != null) {
            //   unregisterPhone(vPhone);
            //}

            mPhones.remove(basePhone);
            mRingingCalls.remove(basePhone.getRingingCall());
+7 −6
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ public abstract class PhoneBase extends Handler implements Phone {

    private final Object mImsLock = new Object();
    private boolean mImsServiceReady = false;
    protected ImsPhone mImsPhone = null;
    protected static ImsPhone mImsPhone = null;

    protected int mRadioAccessFamily = RadioAccessFamily.RAF_UNKNOWN;

@@ -460,11 +460,12 @@ public abstract class PhoneBase extends Handler implements Phone {
                mTelephonyTester.dispose();
            }

            ImsPhone imsPhone = mImsPhone;
            if (imsPhone != null) {
                imsPhone.unregisterForSilentRedial(this);
                imsPhone.dispose();
            }
            // No deed to dispose static object
            //ImsPhone imsPhone = mImsPhone;
            //if (imsPhone != null) {
            //    imsPhone.unregisterForSilentRedial(this);
            //    imsPhone.dispose();
            //}
        }
    }

+5 −0
Original line number Diff line number Diff line
@@ -190,6 +190,11 @@ public class ImsPhone extends ImsPhoneBase {
        //Force all referenced classes to unregister their former registered events
    }

    @Override
    public Phone getImsPhone() {
        return null;
    }

    @Override
    public void removeReferences() {
        Rlog.d(LOG_TAG, "removeReferences");