Merge "Rename from "handle to address"." into lmp-dev
diff --git a/sip/src/com/android/services/telephony/sip/SipConnection.java b/sip/src/com/android/services/telephony/sip/SipConnection.java
index bb316e2..dc7f720 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnection.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnection.java
@@ -64,7 +64,7 @@
getPhone().registerForPreciseCallStateChanged(mHandler, MSG_PRECISE_CALL_STATE_CHANGED,
null);
}
- updateHandle();
+ updateAddress();
setInitialized();
}
@@ -226,7 +226,7 @@
case ALERTING:
setDialing();
// For SIP calls, we need to ask the framework to play the ringback for us.
- setRequestingRingback(true);
+ setRingbackRequested(true);
break;
case INCOMING:
case WAITING:
@@ -272,14 +272,14 @@
/**
* Updates the handle on this connection based on the original connection.
*/
- private void updateHandle() {
+ private void updateAddress() {
if (mOriginalConnection != null) {
- Uri handle = getHandleFromAddress(mOriginalConnection.getAddress());
+ Uri address = getAddressFromNumber(mOriginalConnection.getAddress());
int presentation = mOriginalConnection.getNumberPresentation();
- if (!Objects.equals(handle, getHandle()) ||
- presentation != getHandlePresentation()) {
- com.android.services.telephony.Log.v(this, "updateHandle, handle changed");
- setHandle(handle, presentation);
+ if (!Objects.equals(address, getAddress()) ||
+ presentation != getAddressPresentation()) {
+ com.android.services.telephony.Log.v(this, "updateAddress, address changed");
+ setAddress(address, presentation);
}
String name = mOriginalConnection.getCnapName();
@@ -287,24 +287,24 @@
if (!Objects.equals(name, getCallerDisplayName()) ||
namePresentation != getCallerDisplayNamePresentation()) {
com.android.services.telephony.Log
- .v(this, "updateHandle, caller display name changed");
+ .v(this, "updateAddress, caller display name changed");
setCallerDisplayName(name, namePresentation);
}
}
}
/**
- * Determines the handle for an incoming number.
+ * Determines the address for an incoming number.
*
- * @param address The incoming number.
+ * @param number The incoming number.
* @return The Uri representing the number.
*/
- private static Uri getHandleFromAddress(String address) {
+ private static Uri getAddressFromNumber(String number) {
// Address can be null for blocked calls.
- if (address == null) {
- address = "";
+ if (number == null) {
+ number = "";
}
- return Uri.fromParts(PhoneAccount.SCHEME_SIP, address, null);
+ return Uri.fromParts(PhoneAccount.SCHEME_SIP, number, null);
}
private void close() {
diff --git a/sip/src/com/android/services/telephony/sip/SipConnectionService.java b/sip/src/com/android/services/telephony/sip/SipConnectionService.java
index e10d94d..74d66f9 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnectionService.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnectionService.java
@@ -82,7 +82,7 @@
}
final SipConnection connection = new SipConnection();
- connection.setHandle(request.getAddress(), TelecommManager.PRESENTATION_ALLOWED);
+ connection.setAddress(request.getAddress(), TelecommManager.PRESENTATION_ALLOWED);
connection.setInitializing();
connection.onAddedToCallService();
boolean attemptCall = true;
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 31b6f01..531e1e2 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -66,7 +66,7 @@
"not foreground connection, skipping");
return;
}
- setRequestingRingback((Boolean) ((AsyncResult) msg.obj).result);
+ setRingbackRequested((Boolean) ((AsyncResult) msg.obj).result);
break;
}
}
@@ -332,22 +332,22 @@
}
}
- protected final void updateHandle() {
+ protected final void updateAddress() {
updateCallCapabilities();
if (mOriginalConnection != null) {
- Uri handle = getHandleFromAddress(mOriginalConnection.getAddress());
+ Uri address = getAddressFromNumber(mOriginalConnection.getAddress());
int presentation = mOriginalConnection.getNumberPresentation();
- if (!Objects.equals(handle, getHandle()) ||
- presentation != getHandlePresentation()) {
- Log.v(this, "updateHandle, handle changed");
- setHandle(handle, presentation);
+ if (!Objects.equals(address, getAddress()) ||
+ presentation != getAddressPresentation()) {
+ Log.v(this, "updateAddress, address changed");
+ setAddress(address, presentation);
}
String name = mOriginalConnection.getCnapName();
int namePresentation = mOriginalConnection.getCnapNamePresentation();
if (!Objects.equals(name, getCallerDisplayName()) ||
namePresentation != getCallerDisplayNamePresentation()) {
- Log.v(this, "updateHandle, caller display name changed");
+ Log.v(this, "updateAddress, caller display name changed");
setCallerDisplayName(name, namePresentation);
}
}
@@ -380,7 +380,7 @@
setVideoProvider(mOriginalConnection.getVideoProvider());
setAudioQuality(mOriginalConnection.getAudioQuality());
- updateHandle();
+ updateAddress();
}
protected void hangup(int disconnectCause) {
@@ -518,7 +518,7 @@
}
}
updateCallCapabilities();
- updateHandle();
+ updateAddress();
}
private void close() {
@@ -630,12 +630,12 @@
updateCallCapabilities();
}
- private static Uri getHandleFromAddress(String address) {
+ private static Uri getAddressFromNumber(String number) {
// Address can be null for blocked calls.
- if (address == null) {
- address = "";
+ if (number == null) {
+ number = "";
}
- return Uri.fromParts(PhoneAccount.SCHEME_TEL, address, null);
+ return Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null);
}
/**
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 29e78fa..38b6001 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -143,7 +143,7 @@
return Connection.createFailedConnection(
DisconnectCause.OUTGOING_FAILURE, "Invalid phone type");
}
- connection.setHandle(handle, PhoneConstants.PRESENTATION_ALLOWED);
+ connection.setAddress(handle, PhoneConstants.PRESENTATION_ALLOWED);
connection.setInitializing();
connection.setVideoState(request.getVideoState());
@@ -224,7 +224,7 @@
private void placeOutgoingConnection(
TelephonyConnection connection, Phone phone, ConnectionRequest request) {
- String number = connection.getHandle().getSchemeSpecificPart();
+ String number = connection.getAddress().getSchemeSpecificPart();
com.android.internal.telephony.Connection originalConnection;
try {