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

Commit fa9f5de3 authored by Brad Ebinger's avatar Brad Ebinger Committed by android-build-merger
Browse files

Fix ImsManager NPE encountered during GTS testing

am: fcd9bdc8

Change-Id: I6bf76a047c199981c06701aff7fa320a5472c067
parents 4d501ce6 fcd9bdc8
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -332,16 +332,19 @@ public class ImsManager {

        private void retryGetImsService() {
            synchronized (mLock) {
                if (mImsManager != null) {
                    // remove callback so we do not receive updates from old ImsServiceProxy when
                    // switching between ImsServices.
                    mImsManager.removeNotifyStatusChangedCallback(mNotifyStatusChangedCallback);
                    //Leave mImsManager as null, then CallStateException will be thrown when dialing
                    mImsManager = null;
                }

                // Exponential backoff during retry, limited to 32 seconds.
                removeCallbacks(mGetServiceRunnable);
                postDelayed(mGetServiceRunnable, mRetryTimeout.get());
            }
        }

        private void getImsService() throws ImsException {
            synchronized (mLock) {