summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom/ConnectionService.java
diff options
context:
space:
mode:
authorRavindra <c_rthat@codeaurora.org>2015-09-21 14:43:05 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:28:59 -0600
commitd13db38a856f92670566cc96f87c87846259c575 (patch)
tree99b0c6eb59cfa49932888a10cc158e4f49e64b9a /telecomm/java/android/telecom/ConnectionService.java
parentc96a60e262093e2ae4e4f31349c1864ce83a5bfb (diff)
downloadframeworks_base-d13db38a856f92670566cc96f87c87846259c575.zip
frameworks_base-d13db38a856f92670566cc96f87c87846259c575.tar.gz
frameworks_base-d13db38a856f92670566cc96f87c87846259c575.tar.bz2
MSIM: set phone account handle changes for ECall
Add interface API between Telephony to Telecomm for updating phoneAcount. Currently on multisim, Telephony(PhoneApp) picks the best possible sub for placing emergency call, after selecting the best possible sub, Telephony uses this new interface API to update the phoneAcount handle to Telecomm which inturn helps to display the proper subId on which ECall placed. Add cause codes for EMERGENCY_TEMP_FAILURE and EMERGENCY_TEMP_FAILURE Change-Id: Ic0fdc01810ccc35479a1a9447c40e38122a155a9 CRs-Fixed: 722205,778800, 780893
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rw-r--r--telecomm/java/android/telecom/ConnectionService.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 13497d7..019839f 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -625,6 +625,13 @@ public abstract class ConnectionService extends Service {
mAdapter.setExtras(id, extras);
}
}
+
+ @Override
+ public void onPhoneAccountChanged(Connection c, PhoneAccountHandle pHandle) {
+ String id = mIdByConnection.get(c);
+ Log.i(this, "Adapter onPhoneAccountChanged %s, %s", c, pHandle);
+ mAdapter.setPhoneAccountHandle(id, pHandle);
+ }
};
/** {@inheritDoc} */
@@ -680,7 +687,7 @@ public abstract class ConnectionService extends Service {
callId,
request,
new ParcelableConnection(
- request.getAccountHandle(),
+ getAccountHandle(request, connection),
connection.getState(),
connection.getConnectionCapabilities(),
connection.getAddress(),
@@ -702,6 +709,18 @@ public abstract class ConnectionService extends Service {
}
}
+ /** @hide */
+ public PhoneAccountHandle getAccountHandle(
+ final ConnectionRequest request, Connection connection) {
+ PhoneAccountHandle pHandle = connection.getPhoneAccountHandle();
+ if (pHandle != null) {
+ Log.i(this, "getAccountHandle, return account handle from local, %s", pHandle);
+ return pHandle;
+ } else {
+ return request.getAccountHandle();
+ }
+ }
+
private void abort(String callId) {
Log.d(this, "abort %s", callId);
findConnectionForAction(callId, "abort").onAbort();