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

Commit 8168b680 authored by xulicheng's avatar xulicheng Committed by android-build-merger
Browse files

Remove InCallService after incallservice disconnected am: d733a73a

am: 84bff550

Change-Id: I5180acfb099728915defda18b0019029a4705c72
parents 596c94a9 84bff550
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ public class InCallController extends CallsManagerListenerBase {
        }

        protected void onDisconnected() {
            InCallController.this.onDisconnected(mInCallServiceInfo.getComponentName());
            InCallController.this.onDisconnected(mInCallServiceInfo);
            disconnect();  // Unbind explicitly if we get disconnected.
            if (mListener != null) {
                mListener.onDisconnect(InCallServiceBindingConnection.this);
@@ -1026,6 +1026,7 @@ public class InCallController extends CallsManagerListenerBase {
            mNonUIInCallServiceConnections.disconnect();
            mNonUIInCallServiceConnections = null;
        }
        mInCallServices.clear();
    }

    /**
@@ -1319,12 +1320,12 @@ public class InCallController extends CallsManagerListenerBase {
    /**
     * Cleans up an instance of in-call app after the service has been unbound.
     *
     * @param disconnectedComponent The {@link ComponentName} of the service which disconnected.
     * @param disconnectedInfo The {@link InCallServiceInfo} of the service which disconnected.
     */
    private void onDisconnected(ComponentName disconnectedComponent) {
        Log.i(this, "onDisconnected from %s", disconnectedComponent);
    private void onDisconnected(InCallServiceInfo disconnectedInfo) {
        Log.i(this, "onDisconnected from %s", disconnectedInfo.getComponentName());

        mInCallServices.remove(disconnectedComponent);
        mInCallServices.remove(disconnectedInfo);
    }

    /**