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

Commit 6858acd4 authored by Bernardo Rufino's avatar Bernardo Rufino Committed by android-build-merger
Browse files

Merge "Catch IAE from unbind onServiceDisconnected()" into pi-dev am: c83cf901

am: 0f95a949

Change-Id: I2097f145026be9d72c4d920e2567ea7cc6fe5589
parents c89245f5 0f95a949
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -439,8 +439,17 @@ public class TransportClient {
        synchronized (mStateLock) {
            log(Priority.ERROR, "Service disconnected: client UNUSABLE");
            setStateLocked(State.UNUSABLE, null);
            try {
                // After unbindService() no calls back to mConnection
                mContext.unbindService(mConnection);
            } catch (IllegalArgumentException e) {
                // TODO: Investigate why this is happening
                // We're UNUSABLE, so any calls to mConnection will be no-op, so it's safe to
                // swallow this one
                log(
                        Priority.WARN,
                        "Exception trying to unbind onServiceDisconnected(): " + e.getMessage());
            }
        }
    }