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

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

Merge "Ignore onNullBinding if onBindingDied in ImsService resolver" am:...

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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7dc673a6ff31c9226e6b2b1430f5d19256d84966
parents e9edb011 cdf43dcd
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,10 @@ public class ImsServiceFeatureQueryManager {


        private final ComponentName mName;
        private final ComponentName mName;
        private final String mIntentFilter;
        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) {
        ImsServiceFeatureQuery(ComponentName name, String intentFilter) {
            mName = name;
            mName = name;
@@ -85,6 +89,7 @@ public class ImsServiceFeatureQueryManager {


        @Override
        @Override
        public void onBindingDied(ComponentName name) {
        public void onBindingDied(ComponentName name) {
            mIsServiceConnectionDead = true;
            Log.w(LOG_TAG, "onBindingDied: " + name);
            Log.w(LOG_TAG, "onBindingDied: " + name);
            cleanup();
            cleanup();
            // retry again!
            // retry again!
@@ -94,6 +99,9 @@ public class ImsServiceFeatureQueryManager {
        @Override
        @Override
        public void onNullBinding(ComponentName name) {
        public void onNullBinding(ComponentName name) {
            Log.w(LOG_TAG, "onNullBinding: " + 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();
            cleanup();
            mListener.onPermanentError(name);
            mListener.onPermanentError(name);
        }
        }