Wiring up RTP Transport.
- Add support for loading config.xml values pertinent to
ImsPhoneCallTracker on phone initialiation.
- Add support for new shell command "d2d send -t type -v value"; this
lets us test sending D2D comms messages.
- More logging!
Test: Performed test of new adb shell command and verified that logs
indicate proper passthrough of messages.
Test: Added unit tests to verify that the D2D communicator will be set up
in a TelephonyConnection when it's an IMS connection and D2D comms is
enabled.
Bug: 163085177
Change-Id: I042e7da030e6dd41d2c20f095416185a14194213
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 3e608d2..73fbb4b 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -9759,6 +9759,32 @@
}
/**
+ * Sends a device to device communication message. Only usable via shell.
+ * @param message message to send.
+ * @param value message value.
+ */
+ @Override
+ public void sendDeviceToDeviceMessage(int message, int value) {
+ TelephonyPermissions.enforceShellOnly(Binder.getCallingUid(),
+ "setCarrierSingleRegistrationEnabledOverride");
+ enforceModifyPermission();
+
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ TelephonyConnectionService service =
+ TelecomAccountRegistry.getInstance(null).getTelephonyConnectionService();
+ if (service == null) {
+ Rlog.e(LOG_TAG, "sendDeviceToDeviceMessage: not in a call.");
+ return;
+ }
+ service.sendTestDeviceToDeviceMessage(message, value);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+
+ /**
* Gets the config of RCS VoLTE single registration enabled for the device.
*/
@Override