Merge "Update phone account settings string, for consistency." into lmp-dev
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index ccd8941..7718df6 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -615,7 +615,7 @@
setHandle(connection.getHandle(), connection.getHandlePresentation());
setCallerDisplayName(
connection.getCallerDisplayName(), connection.getCallerDisplayNamePresentation());
-
+ setCallCapabilities(connection.getCapabilities());
setVideoProvider(connection.getVideoProvider());
setVideoState(connection.getVideoState());
setRequestingRingback(connection.isRequestingRingback());
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index a9c2c3e..4e3a0cb 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -538,6 +538,11 @@
Log.w(this, "Unknown call (%s) asked to be removed from hold", call);
} else {
Log.d(this, "unholding call: (%s)", call);
+ for (Call c : mCalls) {
+ if (c != null && c.isAlive() && c != call) {
+ c.hold();
+ }
+ }
call.unhold();
}
}
diff --git a/src/com/android/telecomm/ConnectionServiceWrapper.java b/src/com/android/telecomm/ConnectionServiceWrapper.java
index f535267..264ee63 100644
--- a/src/com/android/telecomm/ConnectionServiceWrapper.java
+++ b/src/com/android/telecomm/ConnectionServiceWrapper.java
@@ -889,10 +889,7 @@
if (connection.getState() == Connection.STATE_DISCONNECTED) {
// A connection that begins in the DISCONNECTED state is an indication of
// failure to connect; we handle all failures uniformly
- removeCall(
- callId,
- connection.getFailureCode(),
- connection.getFailureMessage());
+ removeCall(callId, connection.getDisconnectCause(), connection.getDisconnectMessage());
} else {
// Successful connection
if (mPendingResponses.containsKey(callId)) {
diff --git a/tests/src/com/android/telecomm/testapps/CallServiceNotifier.java b/tests/src/com/android/telecomm/testapps/CallServiceNotifier.java
index 0688f3b..5fd75e5 100644
--- a/tests/src/com/android/telecomm/testapps/CallServiceNotifier.java
+++ b/tests/src/com/android/telecomm/testapps/CallServiceNotifier.java
@@ -96,6 +96,8 @@
TelecommManager telecommManager =
(TelecommManager) context.getSystemService(Context.TELECOMM_SERVICE);
+ telecommManager.clearAccounts(context.getPackageName());
+
telecommManager.registerPhoneAccount(PhoneAccount.builder()
.withAccountHandle(
new PhoneAccountHandle(
@@ -105,21 +107,22 @@
.withSubscriptionNumber("555-TEST")
.withCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER)
.withIconResId(R.drawable.stat_sys_phone_call)
- .withLabel("Dummy Service")
- .withShortDescription("a short description for the dummy service")
+ .withLabel("TelecommTestApp Call Provider")
+ .withShortDescription("a short description for the call provider")
.build());
telecommManager.registerPhoneAccount(PhoneAccount.builder()
.withAccountHandle(
new PhoneAccountHandle(
- new ComponentName(context, TestConnectionManager.class),
+ new ComponentName(context, TestConnectionService.class),
SIM_SUBSCRIPTION_ID))
- .withHandle(Uri.parse("tel:555-CMGR"))
- .withSubscriptionNumber("555-CMGR")
- .withCapabilities(PhoneAccount.CAPABILITY_CONNECTION_MANAGER)
+ .withHandle(Uri.parse("tel:555-TSIM"))
+ .withSubscriptionNumber("555-TSIM")
+ .withCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER |
+ PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)
.withIconResId(R.drawable.stat_sys_phone_call)
- .withLabel("Dummy Connection Manager")
- .withShortDescription("a short description for the dummy connection manager")
+ .withLabel("TelecommTestApp SIM Subscription")
+ .withShortDescription("a short description for the sim subscription")
.build());
telecommManager.registerPhoneAccount(PhoneAccount.builder()
diff --git a/tests/src/com/android/telecomm/testapps/TestConnectionManager.java b/tests/src/com/android/telecomm/testapps/TestConnectionManager.java
index 69c5ea6..902ace7 100644
--- a/tests/src/com/android/telecomm/testapps/TestConnectionManager.java
+++ b/tests/src/com/android/telecomm/testapps/TestConnectionManager.java
@@ -181,7 +181,7 @@
}
private static void log(String msg) {
- Log.w("telecomtestcs", "[TestConnectionService] " + msg);
+ Log.w("telecomtestcs", "[TestConnectionManager] " + msg);
}
@Override
@@ -200,7 +200,7 @@
PhoneAccountHandle connectionManagerAccount,
final ConnectionRequest request) {
return new TestManagedConnection(
- createRemoteOutgoingConnection(
+ createRemoteIncomingConnection(
request.getAccountHandle(),
request),
true);