summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brad Ebinger <breadley@google.com> 2018-04-11 11:25:05 -0700
committer Brad Ebinger <breadley@google.com> 2018-06-06 16:05:54 -0700
commit929772680a6b176ea3de2783fc14d070f8f421c8 (patch)
tree9db4425f5cc3e51dd7f0eec85e38460112096da5
parentb044b885cf51ef350745e9178e763c0b4db8a86a (diff)
Update Docs to clarify using a Message across IPC
When using Message across IPC, the message must be sent with a Messenger. Update Docs to reflect this. Bug: 77870347 Test: Telephony Unit Tests Merged-In: Ie1a0be63d26136f14cd30c354b889ec0311cc7ee Change-Id: I27977a13f7ccb6875b5fdb7eb6c6836a84166eeb
-rw-r--r--telephony/java/android/telephony/ims/feature/MmTelFeature.java15
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java17
2 files changed, 28 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/ims/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
index f12540f8dd13..bc790fb0a6e6 100644
--- a/telephony/java/android/telephony/ims/feature/MmTelFeature.java
+++ b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
@@ -18,7 +18,6 @@ package android.telephony.ims.feature;
import android.annotation.IntDef;
import android.annotation.SystemApi;
-import android.net.Uri;
import android.os.Bundle;
import android.os.Message;
import android.os.RemoteException;
@@ -644,7 +643,19 @@ public class MmTelFeature extends ImsFeature {
* {@link TelecomManager#TTY_MODE_FULL},
* {@link TelecomManager#TTY_MODE_HCO},
* {@link TelecomManager#TTY_MODE_VCO}
- * @param onCompleteMessage A {@link Message} to be used when the mode has been set.
+ * @param onCompleteMessage If non-null, this MmTelFeature should call this {@link Message} when
+ * the operation is complete by using the associated {@link android.os.Messenger} in
+ * {@link Message#replyTo}. For example:
+ * {@code
+ * // Set UI TTY Mode and other operations...
+ * try {
+ * // Notify framework that the mode was changed.
+ * Messenger uiMessenger = onCompleteMessage.replyTo;
+ * uiMessenger.send(onCompleteMessage);
+ * } catch (RemoteException e) {
+ * // Remote side is dead
+ * }
+ * }
*/
public void setUiTtyMode(int mode, Message onCompleteMessage) {
// Base Implementation - Should be overridden
diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
index 7b9fe2b144ab..da6a7a60c3b3 100644
--- a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
@@ -30,8 +30,6 @@ import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsVideoCallProvider;
import android.telephony.ims.ImsVideoCallProvider;
-import dalvik.system.CloseGuard;
-
/**
* Base implementation of IImsCallSession, which implements stub versions of the methods available.
*
@@ -510,6 +508,21 @@ public class ImsCallSessionImplBase implements AutoCloseable {
* and event flash to 16. Currently, event flash is not supported.
*
* @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
+ * @param result If non-null, the {@link Message} to send when the operation is complete. This
+ * is done by using the associated {@link android.os.Messenger} in
+ * {@link Message#replyTo}. For example:
+ * {@code
+ * // Send DTMF and other operations...
+ * try {
+ * // Notify framework that the DTMF was sent.
+ * Messenger dtmfMessenger = result.replyTo;
+ * if (dtmfMessenger != null) {
+ * dtmfMessenger.send(result);
+ * }
+ * } catch (RemoteException e) {
+ * // Remote side is dead
+ * }
+ * }
*/
public void sendDtmf(char c, Message result) {
}