Loading src/com/android/server/telecom/Call.java +30 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ final class Call implements CreateConnectionResponse { void onConnectionManagerPhoneAccountChanged(Call call); void onPhoneAccountChanged(Call call); void onConferenceableCallsChanged(Call call); void onCallSubstateChanged(Call call); } abstract static class ListenerBase implements Listener { Loading Loading @@ -138,6 +139,8 @@ final class Call implements CreateConnectionResponse { public void onPhoneAccountChanged(Call call) {} @Override public void onConferenceableCallsChanged(Call call) {} @Override public void onCallSubstateChanged(Call call) {} } private static final OnQueryCompleteListener sCallerInfoQueryListener = Loading Loading @@ -291,6 +294,7 @@ final class Call implements CreateConnectionResponse { private int mNotificationType; private int mCode; boolean mIsActiveSub = false; private int mCallSubstate; private boolean mWasConferencePreviouslyMerged = false; Loading Loading @@ -356,7 +360,7 @@ final class Call implements CreateConnectionResponse { component = mConnectionService.getComponentName().flattenToShortString(); } return String.format(Locale.US, "[%s, %s, %s, %s, %d, childs(%d), has_parent(%b), [%s], %b, %s]", return String.format(Locale.US, "[%s, %s, %s, %s, %d, childs(%d), has_parent(%b), [%s], %b, %s %d]", System.identityHashCode(this), CallState.toString(mState), component, Loading @@ -365,7 +369,9 @@ final class Call implements CreateConnectionResponse { getChildCalls().size(), getParentCall() != null, PhoneCapabilities.toString(getCallCapabilities()), mIsActiveSub, mTargetPhoneAccountHandle); mIsActiveSub, mTargetPhoneAccountHandle, getCallSubstate()); } int getState() { Loading Loading @@ -711,6 +717,7 @@ final class Call implements CreateConnectionResponse { setRingbackRequested(connection.isRingbackRequested()); setIsVoipAudioMode(connection.getIsVoipAudioMode()); setStatusHints(connection.getStatusHints()); setCallSubstate(connection.getCallSubstate()); mConferenceableCalls.clear(); for (String id : connection.getConferenceableConnectionIds()) { Loading Loading @@ -1399,4 +1406,25 @@ final class Call implements CreateConnectionResponse { } return CallState.DISCONNECTED; } /** * The current call substate. */ public int getCallSubstate() { return mCallSubstate; } /** * Determines the current substate for the call. * * @param callSubstate The substate for the call. */ public void setCallSubstate(int callSubstate) { mCallSubstate = callSubstate; for (Listener l : mListeners) { l.onCallSubstateChanged(this); } } } src/com/android/server/telecom/CallsManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public final class CallsManager extends Call.ListenerBase { void onIsConferencedChanged(Call call); void onIsVoipAudioModeChanged(Call call); void onVideoStateChanged(Call call); void onCallSubstateChanged(Call call); } /** Loading Loading @@ -312,6 +313,13 @@ public final class CallsManager extends Call.ListenerBase { } } @Override public void onCallSubstateChanged(Call call) { for (CallsManagerListener listener : mListeners) { listener.onCallSubstateChanged(call); } } ImmutableCollection<Call> getCalls() { return ImmutableList.copyOf(mCalls); } Loading src/com/android/server/telecom/CallsManagerListenerBase.java +4 −0 Original line number Diff line number Diff line Loading @@ -72,4 +72,8 @@ class CallsManagerListenerBase implements CallsManager.CallsManagerListener { @Override public void onVideoStateChanged(Call call) { } @Override public void onCallSubstateChanged(Call call) { } } src/com/android/server/telecom/ConnectionServiceWrapper.java +17 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> { private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20; private static final int MSG_SET_DISCONNECTED_WITH_SUPP_NOTIFICATION = 22; private static final int MSG_SET_PHONE_ACCOUNT = 23; private static final int MSG_SET_CALL_SUBSTATE = 24; private final Handler mHandler = new Handler() { @Override Loading Loading @@ -389,6 +390,13 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> { } break; } case MSG_SET_CALL_SUBSTATE: { call = mCallIdMapper.getCall(msg.obj); if (call != null) { call.setCallSubstate(msg.arg1); } break; } } } }; Loading Loading @@ -624,6 +632,15 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> { mHandler.obtainMessage(MSG_SET_PHONE_ACCOUNT, args).sendToTarget(); } } @Override public void setCallSubstate(String callId, int callSubstate) { logIncoming("setCallSubstate %s %d", callId, callSubstate); if (mCallIdMapper.isValidCallId(callId)) { mHandler.obtainMessage( MSG_SET_CALL_SUBSTATE, callSubstate, 0, callId).sendToTarget(); } } } private final Adapter mAdapter = new Adapter(); Loading src/com/android/server/telecom/InCallController.java +7 −1 Original line number Diff line number Diff line Loading @@ -117,6 +117,11 @@ public final class InCallController extends CallsManagerListenerBase { public void onConferenceableCallsChanged(Call call) { updateCall(call); } @Override public void onCallSubstateChanged(Call call) { updateCall(call); } }; /** Loading Loading @@ -509,7 +514,8 @@ public final class InCallController extends CallsManagerListenerBase { call.getExtras(), call.getNotificationType(), call.getNotificationCode(), call.mIsActiveSub); call.mIsActiveSub, call.getCallSubstate()); } /** Loading Loading
src/com/android/server/telecom/Call.java +30 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ final class Call implements CreateConnectionResponse { void onConnectionManagerPhoneAccountChanged(Call call); void onPhoneAccountChanged(Call call); void onConferenceableCallsChanged(Call call); void onCallSubstateChanged(Call call); } abstract static class ListenerBase implements Listener { Loading Loading @@ -138,6 +139,8 @@ final class Call implements CreateConnectionResponse { public void onPhoneAccountChanged(Call call) {} @Override public void onConferenceableCallsChanged(Call call) {} @Override public void onCallSubstateChanged(Call call) {} } private static final OnQueryCompleteListener sCallerInfoQueryListener = Loading Loading @@ -291,6 +294,7 @@ final class Call implements CreateConnectionResponse { private int mNotificationType; private int mCode; boolean mIsActiveSub = false; private int mCallSubstate; private boolean mWasConferencePreviouslyMerged = false; Loading Loading @@ -356,7 +360,7 @@ final class Call implements CreateConnectionResponse { component = mConnectionService.getComponentName().flattenToShortString(); } return String.format(Locale.US, "[%s, %s, %s, %s, %d, childs(%d), has_parent(%b), [%s], %b, %s]", return String.format(Locale.US, "[%s, %s, %s, %s, %d, childs(%d), has_parent(%b), [%s], %b, %s %d]", System.identityHashCode(this), CallState.toString(mState), component, Loading @@ -365,7 +369,9 @@ final class Call implements CreateConnectionResponse { getChildCalls().size(), getParentCall() != null, PhoneCapabilities.toString(getCallCapabilities()), mIsActiveSub, mTargetPhoneAccountHandle); mIsActiveSub, mTargetPhoneAccountHandle, getCallSubstate()); } int getState() { Loading Loading @@ -711,6 +717,7 @@ final class Call implements CreateConnectionResponse { setRingbackRequested(connection.isRingbackRequested()); setIsVoipAudioMode(connection.getIsVoipAudioMode()); setStatusHints(connection.getStatusHints()); setCallSubstate(connection.getCallSubstate()); mConferenceableCalls.clear(); for (String id : connection.getConferenceableConnectionIds()) { Loading Loading @@ -1399,4 +1406,25 @@ final class Call implements CreateConnectionResponse { } return CallState.DISCONNECTED; } /** * The current call substate. */ public int getCallSubstate() { return mCallSubstate; } /** * Determines the current substate for the call. * * @param callSubstate The substate for the call. */ public void setCallSubstate(int callSubstate) { mCallSubstate = callSubstate; for (Listener l : mListeners) { l.onCallSubstateChanged(this); } } }
src/com/android/server/telecom/CallsManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public final class CallsManager extends Call.ListenerBase { void onIsConferencedChanged(Call call); void onIsVoipAudioModeChanged(Call call); void onVideoStateChanged(Call call); void onCallSubstateChanged(Call call); } /** Loading Loading @@ -312,6 +313,13 @@ public final class CallsManager extends Call.ListenerBase { } } @Override public void onCallSubstateChanged(Call call) { for (CallsManagerListener listener : mListeners) { listener.onCallSubstateChanged(call); } } ImmutableCollection<Call> getCalls() { return ImmutableList.copyOf(mCalls); } Loading
src/com/android/server/telecom/CallsManagerListenerBase.java +4 −0 Original line number Diff line number Diff line Loading @@ -72,4 +72,8 @@ class CallsManagerListenerBase implements CallsManager.CallsManagerListener { @Override public void onVideoStateChanged(Call call) { } @Override public void onCallSubstateChanged(Call call) { } }
src/com/android/server/telecom/ConnectionServiceWrapper.java +17 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> { private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20; private static final int MSG_SET_DISCONNECTED_WITH_SUPP_NOTIFICATION = 22; private static final int MSG_SET_PHONE_ACCOUNT = 23; private static final int MSG_SET_CALL_SUBSTATE = 24; private final Handler mHandler = new Handler() { @Override Loading Loading @@ -389,6 +390,13 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> { } break; } case MSG_SET_CALL_SUBSTATE: { call = mCallIdMapper.getCall(msg.obj); if (call != null) { call.setCallSubstate(msg.arg1); } break; } } } }; Loading Loading @@ -624,6 +632,15 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> { mHandler.obtainMessage(MSG_SET_PHONE_ACCOUNT, args).sendToTarget(); } } @Override public void setCallSubstate(String callId, int callSubstate) { logIncoming("setCallSubstate %s %d", callId, callSubstate); if (mCallIdMapper.isValidCallId(callId)) { mHandler.obtainMessage( MSG_SET_CALL_SUBSTATE, callSubstate, 0, callId).sendToTarget(); } } } private final Adapter mAdapter = new Adapter(); Loading
src/com/android/server/telecom/InCallController.java +7 −1 Original line number Diff line number Diff line Loading @@ -117,6 +117,11 @@ public final class InCallController extends CallsManagerListenerBase { public void onConferenceableCallsChanged(Call call) { updateCall(call); } @Override public void onCallSubstateChanged(Call call) { updateCall(call); } }; /** Loading Loading @@ -509,7 +514,8 @@ public final class InCallController extends CallsManagerListenerBase { call.getExtras(), call.getNotificationType(), call.getNotificationCode(), call.mIsActiveSub); call.mIsActiveSub, call.getCallSubstate()); } /** Loading