summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom/ConnectionService.java
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2015-05-27 17:21:45 -0700
committerSantos Cordon <santoscordon@google.com>2015-05-28 09:43:00 -0700
commit6b7f955c2d9b231660b8c54f8ef8e8e6ad802625 (patch)
treec594cb452d2bb826d4a7c502b2ca857a81492e90 /telecomm/java/android/telecom/ConnectionService.java
parent6ffab1bd65d2b5cc9e2944712058cb42babaa76b (diff)
downloadframeworks_base-6b7f955c2d9b231660b8c54f8ef8e8e6ad802625.zip
frameworks_base-6b7f955c2d9b231660b8c54f8ef8e8e6ad802625.tar.gz
frameworks_base-6b7f955c2d9b231660b8c54f8ef8e8e6ad802625.tar.bz2
Add extras to Connections/Calls. (1/3)
Two major changes: 1) Add the notion of extras to a Connection. These extras will be parceled through to InCallService as Call.getExtras() 2) The previously existing Call.getExtras() has been renamed to getIntentExtras(). This name better describes the fact that these particular extras are from the original CALL or INCOMING_CALL intents. Change-Id: I08c1baf4f08d54757f98012f0c08b423a707c53d
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rw-r--r--telecomm/java/android/telecom/ConnectionService.java24
1 files changed, 21 insertions, 3 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 199100b..1e8ae88 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -21,6 +21,7 @@ import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
+import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -432,6 +433,12 @@ public abstract class ConnectionService extends Service {
String id = mIdByConference.get(conference);
mAdapter.setStatusHints(id, statusHints);
}
+
+ @Override
+ public void onExtrasChanged(Conference conference, Bundle extras) {
+ String id = mIdByConference.get(conference);
+ mAdapter.setExtras(id, extras);
+ }
};
private final Connection.Listener mConnectionListener = new Connection.Listener() {
@@ -569,6 +576,14 @@ public abstract class ConnectionService extends Service {
mAdapter.onConferenceMergeFailed(id);
}
}
+
+ @Override
+ public void onExtrasChanged(Connection connection, Bundle extras) {
+ String id = mIdByConnection.get(connection);
+ if (id != null) {
+ mAdapter.setExtras(id, extras);
+ }
+ }
};
/** {@inheritDoc} */
@@ -638,7 +653,8 @@ public abstract class ConnectionService extends Service {
connection.getAudioModeIsVoip(),
connection.getStatusHints(),
connection.getDisconnectCause(),
- createIdList(connection.getConferenceables())));
+ createIdList(connection.getConferenceables()),
+ connection.getExtras()));
}
private void abort(String callId) {
@@ -919,7 +935,8 @@ public abstract class ConnectionService extends Service {
null : conference.getVideoProvider().getInterface(),
conference.getVideoState(),
conference.getConnectTimeMillis(),
- conference.getStatusHints());
+ conference.getStatusHints(),
+ conference.getExtras());
mAdapter.addConferenceCall(id, parcelableConference);
mAdapter.setVideoProvider(id, conference.getVideoProvider());
@@ -964,7 +981,8 @@ public abstract class ConnectionService extends Service {
connection.getAudioModeIsVoip(),
connection.getStatusHints(),
connection.getDisconnectCause(),
- emptyList);
+ emptyList,
+ connection.getExtras());
mAdapter.addExistingConnection(id, parcelableConnection);
}
}