Loading src/com/android/server/telecom/CallsManager.java +10 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Set; Loading Loading @@ -114,6 +115,7 @@ public final class CallsManager extends Call.ListenerBase { private final Context mContext; private final PhoneAccountRegistrar mPhoneAccountRegistrar; private final MissedCallNotifier mMissedCallNotifier; private final Set<Call> mLocallyDisconnectingCalls = new HashSet<>(); /** * The call the user is currently interacting with. This is the call that should have audio Loading Loading @@ -571,6 +573,7 @@ public final class CallsManager extends Call.ListenerBase { if (!mCalls.contains(call)) { Log.w(this, "Unknown call (%s) asked to disconnect", call); } else { mLocallyDisconnectingCalls.add(call); call.disconnect(); } } Loading Loading @@ -709,7 +712,6 @@ public final class CallsManager extends Call.ListenerBase { void markCallAsDisconnected(Call call, DisconnectCause disconnectCause) { call.setDisconnectCause(disconnectCause); setCallState(call, CallState.DISCONNECTED); removeCall(call); } /** Loading @@ -717,6 +719,12 @@ public final class CallsManager extends Call.ListenerBase { */ void markCallAsRemoved(Call call) { removeCall(call); if (mLocallyDisconnectingCalls.contains(call)) { mLocallyDisconnectingCalls.remove(call); if (mForegroundCall != null && mForegroundCall.getState() == CallState.ON_HOLD) { mForegroundCall.unhold(); } } } /** Loading Loading @@ -1009,9 +1017,7 @@ public final class CallsManager extends Call.ListenerBase { Log.v(this, "Updating foreground call, %s -> %s.", mForegroundCall, newForegroundCall); Call oldForegroundCall = mForegroundCall; mForegroundCall = newForegroundCall; if (mForegroundCall != null && mForegroundCall.getState() == CallState.ON_HOLD) { mForegroundCall.unhold(); } for (CallsManagerListener listener : mListeners) { listener.onForegroundCallChanged(oldForegroundCall, mForegroundCall); } Loading Loading
src/com/android/server/telecom/CallsManager.java +10 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Set; Loading Loading @@ -114,6 +115,7 @@ public final class CallsManager extends Call.ListenerBase { private final Context mContext; private final PhoneAccountRegistrar mPhoneAccountRegistrar; private final MissedCallNotifier mMissedCallNotifier; private final Set<Call> mLocallyDisconnectingCalls = new HashSet<>(); /** * The call the user is currently interacting with. This is the call that should have audio Loading Loading @@ -571,6 +573,7 @@ public final class CallsManager extends Call.ListenerBase { if (!mCalls.contains(call)) { Log.w(this, "Unknown call (%s) asked to disconnect", call); } else { mLocallyDisconnectingCalls.add(call); call.disconnect(); } } Loading Loading @@ -709,7 +712,6 @@ public final class CallsManager extends Call.ListenerBase { void markCallAsDisconnected(Call call, DisconnectCause disconnectCause) { call.setDisconnectCause(disconnectCause); setCallState(call, CallState.DISCONNECTED); removeCall(call); } /** Loading @@ -717,6 +719,12 @@ public final class CallsManager extends Call.ListenerBase { */ void markCallAsRemoved(Call call) { removeCall(call); if (mLocallyDisconnectingCalls.contains(call)) { mLocallyDisconnectingCalls.remove(call); if (mForegroundCall != null && mForegroundCall.getState() == CallState.ON_HOLD) { mForegroundCall.unhold(); } } } /** Loading Loading @@ -1009,9 +1017,7 @@ public final class CallsManager extends Call.ListenerBase { Log.v(this, "Updating foreground call, %s -> %s.", mForegroundCall, newForegroundCall); Call oldForegroundCall = mForegroundCall; mForegroundCall = newForegroundCall; if (mForegroundCall != null && mForegroundCall.getState() == CallState.ON_HOLD) { mForegroundCall.unhold(); } for (CallsManagerListener listener : mListeners) { listener.onForegroundCallChanged(oldForegroundCall, mForegroundCall); } Loading