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

Commit 905c2bcf authored by Jordan Liu's avatar Jordan Liu Committed by Automerger Merge Worker
Browse files

Merge "Catch exception when unbinding" am: 814d22e1

Change-Id: I59a9f44b6916ee7c35ed96dc5b7a655cf7f4e624
parents e1e902c5 814d22e1
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -282,6 +282,7 @@ public class CarrierServiceBindHelper {
                                Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE,
                                (r) -> mHandler.post(r),
                                connection)) {
                    log("service bound");
                    mServiceBound = true;
                    return;
                }
@@ -340,7 +341,12 @@ public class CarrierServiceBindHelper {
            if (mServiceBound) {
                log("Unbinding from carrier app");
                mServiceBound = false;
                try {
                    mContext.unbindService(connection);
                } catch (IllegalArgumentException e) {
                    //TODO(b/151328766): Figure out why we unbind without binding
                    loge("Tried to unbind without binding e=" + e);
                }
            } else {
                log("Not bound, skipping unbindService call");
            }