Change telecomm APIs from protected to public (3/3)
Bug: 16416927
Change-Id: I859c80a120fa59bba12a5c6bfca17fa57613a6aa
diff --git a/sip/src/com/android/services/telephony/sip/SipConnection.java b/sip/src/com/android/services/telephony/sip/SipConnection.java
index efc9676..9415b8e 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnection.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnection.java
@@ -59,7 +59,7 @@
}
@Override
- protected void onSetAudioState(CallAudioState state) {
+ public void onSetAudioState(CallAudioState state) {
if (VERBOSE) log("onSetAudioState: " + state);
if (getPhone() != null) {
getPhone().setEchoSuppressionEnabled();
@@ -67,12 +67,12 @@
}
@Override
- protected void onSetState(int state) {
+ public void onSetState(int state) {
if (VERBOSE) log("onSetState, state: " + Connection.stateToString(state));
}
@Override
- protected void onPlayDtmfTone(char c) {
+ public void onPlayDtmfTone(char c) {
if (VERBOSE) log("onPlayDtmfTone");
if (getPhone() != null) {
getPhone().startDtmf(c);
@@ -80,7 +80,7 @@
}
@Override
- protected void onStopDtmfTone() {
+ public void onStopDtmfTone() {
if (VERBOSE) log("onStopDtmfTone");
if (getPhone() != null) {
getPhone().stopDtmf();
@@ -88,7 +88,7 @@
}
@Override
- protected void onDisconnect() {
+ public void onDisconnect() {
if (VERBOSE) log("onDisconnect");
try {
if (getCall() != null && !getCall().isMultiparty()) {
@@ -102,7 +102,7 @@
}
@Override
- protected void onSeparate() {
+ public void onSeparate() {
if (VERBOSE) log("onSeparate");
try {
if (mOriginalConnection != null) {
@@ -114,13 +114,13 @@
}
@Override
- protected void onAbort() {
+ public void onAbort() {
if (VERBOSE) log("onAbort");
onDisconnect();
}
@Override
- protected void onHold() {
+ public void onHold() {
if (VERBOSE) log("onHold");
try {
if (getPhone() != null && getState() == State.ACTIVE) {
@@ -132,7 +132,7 @@
}
@Override
- protected void onUnhold() {
+ public void onUnhold() {
if (VERBOSE) log("onUnhold");
try {
if (getPhone() != null && getState() == State.HOLDING) {
@@ -144,7 +144,7 @@
}
@Override
- protected void onAnswer(int videoState) {
+ public void onAnswer(int videoState) {
if (VERBOSE) log("onAnswer");
try {
if (isValidRingingCall() && getPhone() != null) {
@@ -156,7 +156,7 @@
}
@Override
- protected void onReject() {
+ public void onReject() {
if (VERBOSE) log("onReject");
try {
if (isValidRingingCall() && getPhone() != null) {
@@ -168,24 +168,24 @@
}
@Override
- protected void onPostDialContinue(boolean proceed) {
+ public void onPostDialContinue(boolean proceed) {
if (VERBOSE) log("onPostDialContinue, proceed: " + proceed);
// SIP doesn't have post dial support.
}
@Override
- protected void onSwapWithBackgroundCall() {
+ public void onSwapWithBackgroundCall() {
if (VERBOSE) log("onSwapWithBackgroundCall");
// TODO(sail): Implement swap.
}
@Override
- protected void onChildrenChanged(List<Connection> children) {
+ public void onChildrenChanged(List<Connection> children) {
if (VERBOSE) log("onChildrenChanged, children: " + children);
}
@Override
- protected void onPhoneAccountClicked() {
+ public void onPhoneAccountClicked() {
if (VERBOSE) log("onPhoneAccountClicked");
}
diff --git a/sip/src/com/android/services/telephony/sip/SipConnectionService.java b/sip/src/com/android/services/telephony/sip/SipConnectionService.java
index a1a6b6a..213c9ac 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnectionService.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnectionService.java
@@ -47,7 +47,7 @@
}
@Override
- protected void onCreateOutgoingConnection(
+ public void onCreateOutgoingConnection(
final ConnectionRequest request,
final CreateConnectionResponse<Connection> response) {
if (VERBOSE) log("onCreateOutgoingConnection, request: " + request);
@@ -82,7 +82,7 @@
}
@Override
- protected void onCreateConferenceConnection(
+ public void onCreateConferenceConnection(
String token,
Connection connection,
Response<String, Connection> response) {
@@ -90,7 +90,7 @@
}
@Override
- protected void onCreateIncomingConnection(
+ public void onCreateIncomingConnection(
ConnectionRequest request,
CreateConnectionResponse<Connection> response) {
if (VERBOSE) log("onCreateIncomingConnection, request: " + request);
@@ -138,7 +138,7 @@
}
@Override
- protected void onConnectionAdded(Connection connection) {
+ public void onConnectionAdded(Connection connection) {
if (VERBOSE) log("onConnectionAdded, connection: " + connection);
if (connection instanceof SipConnection) {
((SipConnection) connection).onAddedToCallService();
@@ -146,7 +146,7 @@
}
@Override
- protected void onConnectionRemoved(Connection connection) {
+ public void onConnectionRemoved(Connection connection) {
if (VERBOSE) log("onConnectionRemoved, connection: " + connection);
}
diff --git a/src/com/android/services/telephony/CdmaConnection.java b/src/com/android/services/telephony/CdmaConnection.java
index 52717f9..543df72 100644
--- a/src/com/android/services/telephony/CdmaConnection.java
+++ b/src/com/android/services/telephony/CdmaConnection.java
@@ -30,7 +30,7 @@
/** {@inheritDoc} */
@Override
- protected void onPlayDtmfTone(char digit) {
+ public void onPlayDtmfTone(char digit) {
// TODO(santoscordon): There are conditions where we should play dtmf tones with different
// timeouts.
// TODO(santoscordon): We get explicit response from the phone via a Message when the burst
@@ -43,7 +43,7 @@
/** {@inheritDoc} */
@Override
- protected void onStopDtmfTone() {
+ public void onStopDtmfTone() {
// no-op, we only play timed dtmf tones for cdma.
}
diff --git a/src/com/android/services/telephony/ConferenceConnection.java b/src/com/android/services/telephony/ConferenceConnection.java
index 1afc8e0..33be0be 100644
--- a/src/com/android/services/telephony/ConferenceConnection.java
+++ b/src/com/android/services/telephony/ConferenceConnection.java
@@ -28,7 +28,7 @@
*/
final class ConferenceConnection extends Connection {
@Override
- protected void onChildrenChanged(List<Connection> children) {
+ public void onChildrenChanged(List<Connection> children) {
if (children.isEmpty()) {
setDisconnected(DisconnectCause.LOCAL, "conference call disconnected.");
destroy();
@@ -37,7 +37,7 @@
/** ${inheritDoc} */
@Override
- protected void onDisconnect() {
+ public void onDisconnect() {
// For conference-level disconnects, we need to make sure we disconnect the entire call,
// not just one of the connections. To do this, we go through the children and get a
// reference to the telephony-Call object and call hangup().
@@ -62,7 +62,7 @@
/** ${inheritDoc} */
@Override
- protected void onHold() {
+ public void onHold() {
for (Connection connection : getChildConnections()) {
if (connection instanceof TelephonyConnection) {
((TelephonyConnection) connection).onHold();
diff --git a/src/com/android/services/telephony/GsmConnection.java b/src/com/android/services/telephony/GsmConnection.java
index 8b02b52..a385b9f 100644
--- a/src/com/android/services/telephony/GsmConnection.java
+++ b/src/com/android/services/telephony/GsmConnection.java
@@ -34,7 +34,7 @@
/** {@inheritDoc} */
@Override
- protected void onPlayDtmfTone(char digit) {
+ public void onPlayDtmfTone(char digit) {
if (getPhone() != null) {
getPhone().startDtmf(digit);
}
@@ -42,7 +42,7 @@
/** {@inheritDoc} */
@Override
- protected void onStopDtmfTone() {
+ public void onStopDtmfTone() {
if (getPhone() != null) {
getPhone().stopDtmf();
}
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 13f0b0c..6803bdd 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -147,7 +147,7 @@
}
@Override
- protected void onSetAudioState(CallAudioState audioState) {
+ public void onSetAudioState(CallAudioState audioState) {
// TODO: update TTY mode.
if (getPhone() != null) {
getPhone().setEchoSuppressionEnabled();
@@ -155,18 +155,18 @@
}
@Override
- protected void onSetState(int state) {
+ public void onSetState(int state) {
Log.v(this, "onSetState, state: " + Connection.stateToString(state));
}
@Override
- protected void onDisconnect() {
+ public void onDisconnect() {
Log.v(this, "onDisconnect");
hangup(DisconnectCause.LOCAL);
}
@Override
- protected void onSeparate() {
+ public void onSeparate() {
Log.v(this, "onSeparate");
if (mOriginalConnection != null) {
try {
@@ -178,13 +178,13 @@
}
@Override
- protected void onAbort() {
+ public void onAbort() {
Log.v(this, "onAbort");
hangup(DisconnectCause.LOCAL);
}
@Override
- protected void onHold() {
+ public void onHold() {
Log.v(this, "onHold");
// TODO(santoscordon): Can dialing calls be put on hold as well since they take up the
// foreground call slot?
@@ -218,7 +218,7 @@
}
@Override
- protected void onUnhold() {
+ public void onUnhold() {
Log.v(this, "onUnhold");
if (Call.State.HOLDING == mOriginalConnectionState) {
try {
@@ -233,7 +233,7 @@
}
@Override
- protected void onAnswer(int videoState) {
+ public void onAnswer(int videoState) {
Log.v(this, "onAnswer");
// TODO(santoscordon): Tons of hairy logic is missing here around multiple active calls on
// CDMA devices. See {@link CallManager.acceptCall}.
@@ -248,7 +248,7 @@
}
@Override
- protected void onReject() {
+ public void onReject() {
Log.v(this, "onReject");
if (isValidRingingCall()) {
hangup(DisconnectCause.INCOMING_REJECTED);
@@ -257,7 +257,7 @@
}
@Override
- protected void onPostDialContinue(boolean proceed) {
+ public void onPostDialContinue(boolean proceed) {
Log.v(this, "onPostDialContinue, proceed: " + proceed);
if (mOriginalConnection != null) {
if (proceed) {
@@ -269,17 +269,17 @@
}
@Override
- protected void onSwapWithBackgroundCall() {
+ public void onSwapWithBackgroundCall() {
Log.v(this, "onSwapWithBackgroundCall");
}
@Override
- protected void onChildrenChanged(List<Connection> children) {
+ public void onChildrenChanged(List<Connection> children) {
Log.v(this, "onChildrenChanged, children: " + children);
}
@Override
- protected void onPhoneAccountClicked() {
+ public void onPhoneAccountClicked() {
Log.v(this, "onPhoneAccountClicked");
}
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 9f76207..41b6b9e 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -54,7 +54,7 @@
}
@Override
- protected void onCreateOutgoingConnection(
+ public void onCreateOutgoingConnection(
final ConnectionRequest request,
final CreateConnectionResponse<Connection> response) {
Log.v(this, "onCreateOutgoingConnection, request: " + request);
@@ -141,7 +141,7 @@
}
@Override
- protected void onCreateConferenceConnection(
+ public void onCreateConferenceConnection(
String token,
Connection connection,
Response<String, Connection> response) {
@@ -155,7 +155,7 @@
}
@Override
- protected void onCreateIncomingConnection(
+ public void onCreateIncomingConnection(
ConnectionRequest request,
CreateConnectionResponse<Connection> response) {
Log.v(this, "onCreateIncomingConnection, request: " + request);
@@ -204,7 +204,7 @@
}
@Override
- protected void onConnectionAdded(Connection connection) {
+ public void onConnectionAdded(Connection connection) {
Log.v(this, "onConnectionAdded, connection: " + connection);
if (connection instanceof TelephonyConnection) {
((TelephonyConnection) connection).onAddedToCallService();
@@ -212,7 +212,7 @@
}
@Override
- protected void onConnectionRemoved(Connection connection) {
+ public void onConnectionRemoved(Connection connection) {
Log.v(this, "onConnectionRemoved, connection: " + connection);
if (connection instanceof TelephonyConnection) {
((TelephonyConnection) connection).onRemovedFromCallService();