DO NOT MERGE Add new ConnectionEvent API (hide) to send a notification to Telecom

Connection event used to inform Telecom that it should play or stop
the on hold tone. This is used to play or stop a tone when the peer
puts the current call on hold.

BUG=25357778
Change-Id: I2669f8f5062449784a712b9dd28e576326fcc679
This commit is contained in:
Tyler Gunn
2016-03-17 18:34:27 -07:00
parent 0048acfc16
commit 7904a972e1
7 changed files with 108 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ final class ConnectionServiceAdapterServant {
private static final int MSG_ON_POST_DIAL_CHAR = 22;
private static final int MSG_SET_CONFERENCE_MERGE_FAILED = 23;
private static final int MSG_SET_EXTRAS = 24;
private static final int MSG_ON_CONNECTION_EVENT = 25;
private final IConnectionServiceAdapter mDelegate;
@@ -239,6 +240,17 @@ final class ConnectionServiceAdapterServant {
} finally {
args.recycle();
}
break;
}
case MSG_ON_CONNECTION_EVENT: {
SomeArgs args = (SomeArgs) msg.obj;
try {
mDelegate.onConnectionEvent((String) args.arg1, (String) args.arg2);
} finally {
args.recycle();
}
break;
}
}
}
@@ -419,6 +431,14 @@ final class ConnectionServiceAdapterServant {
args.arg2 = extras;
mHandler.obtainMessage(MSG_SET_EXTRAS, args).sendToTarget();
}
@Override
public final void onConnectionEvent(String connectionId, String event) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId;
args.arg2 = event;
mHandler.obtainMessage(MSG_ON_CONNECTION_EVENT, args).sendToTarget();
}
};
public ConnectionServiceAdapterServant(IConnectionServiceAdapter delegate) {