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

Commit ef1f585a authored by Brad Ebinger's avatar Brad Ebinger Committed by Automerger Merge Worker
Browse files

Merge "Ignore onNullBinding if onBindingDied in ImsService resolver" am: 9dd47bdf

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1606713

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6556b8f2539266695e524f6e590868afb9843b89
parents c49f402e 9dd47bdf
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -43,6 +43,10 @@ public class ImsServiceFeatureQueryManager {

        private final ComponentName mName;
        private final String mIntentFilter;
        // Track the status of whether or not the Service has died in case we need to permanently
        // unbind (see onNullBinding below).
        private boolean mIsServiceConnectionDead = false;


        ImsServiceFeatureQuery(ComponentName name, String intentFilter) {
            mName = name;
@@ -85,6 +89,7 @@ public class ImsServiceFeatureQueryManager {

        @Override
        public void onBindingDied(ComponentName name) {
            mIsServiceConnectionDead = true;
            Log.w(LOG_TAG, "onBindingDied: " + name);
            cleanup();
            // retry again!
@@ -94,6 +99,9 @@ public class ImsServiceFeatureQueryManager {
        @Override
        public void onNullBinding(ComponentName name) {
            Log.w(LOG_TAG, "onNullBinding: " + name);
            // onNullBinding will happen after onBindingDied. In this case, we should not
            // permanently unbind and instead let the automatic rebind occur.
            if (mIsServiceConnectionDead) return;
            cleanup();
            mListener.onPermanentError(name);
        }