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

Commit 1d66ccde authored by Sungsoo Lim's avatar Sungsoo Lim Committed by Android (Google) Code Review
Browse files

Merge "Catch IllegalArgumentException when disconnect" into oc-mr1-dev

parents 8724fb93 c012f6ed
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -256,7 +256,13 @@ public final class MediaBrowser {
     */
     */
    private void forceCloseConnection() {
    private void forceCloseConnection() {
        if (mServiceConnection != null) {
        if (mServiceConnection != null) {
            try {
                mContext.unbindService(mServiceConnection);
                mContext.unbindService(mServiceConnection);
            } catch (IllegalArgumentException e) {
                if (DBG) {
                    Log.d(TAG, "unbindService failed", e);
                }
            }
        }
        }
        mState = CONNECT_STATE_DISCONNECTED;
        mState = CONNECT_STATE_DISCONNECTED;
        mServiceConnection = null;
        mServiceConnection = null;