summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/RemoteConnectionService.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2016-03-23 16:06:34 -0700
committerTyler Gunn <tgunn@google.com>2016-03-23 16:06:34 -0700
commitdee56a8a79f9daa1e597f5d4f399d3a5feedcac4 (patch)
tree1bdde5cc7cd47822590d5f6ceb515145c6d390aa /telecomm/java/android/telecom/RemoteConnectionService.java
parentfbc98e1c30e9ef6827f0dcd8024b0fd2de28cf33 (diff)
Expand call/connection extras API.
Currently, connection extras are propagated up to Telecom as an entire bundle. This is not ideal, as any time a change is made to the extras, the bundle needs to be fetched, changed, and then re-set on the connection, where it is parceled to Telecom as a whole. Using how extras on an Intent as inspiration, this CL adds separate putExtras, putExtra, and removeExtra methods to allow manipulation of the extras bundle without operating on it in its entirety. This Cl also adds support for Calls modifying the extras bundle, with changes propagated back down to ConnectionServices. Bug: 27458894 Change-Id: I152340a3bca2dc03f170b06b172a6823410fb961
Diffstat (limited to 'telecomm/java/android/telecom/RemoteConnectionService.java')
-rw-r--r--telecomm/java/android/telecom/RemoteConnectionService.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java
index fa7183acc350..d88d007e532e 100644
--- a/telecomm/java/android/telecom/RemoteConnectionService.java
+++ b/telecomm/java/android/telecom/RemoteConnectionService.java
@@ -321,13 +321,20 @@ final class RemoteConnectionService {
}
@Override
- public void setExtras(String callId, Bundle extras) {
- if (mConnectionById.containsKey(callId)) {
- findConnectionForAction(callId, "setExtras")
- .setExtras(extras);
+ public void putExtras(String callId, Bundle extras) {
+ if (hasConnection(callId)) {
+ findConnectionForAction(callId, "putExtras").putExtras(extras);
+ } else {
+ findConferenceForAction(callId, "putExtras").putExtras(extras);
+ }
+ }
+
+ @Override
+ public void removeExtras(String callId, List<String> keys) {
+ if (hasConnection(callId)) {
+ findConnectionForAction(callId, "removeExtra").removeExtras(keys);
} else {
- findConferenceForAction(callId, "setExtras")
- .setExtras(extras);
+ findConferenceForAction(callId, "removeExtra").removeExtras(keys);
}
}