summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-10-31 22:06:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-31 22:06:28 +0000
commite1678ddf7a8311c79ccba5a6b6183f9484fa1f1f (patch)
tree3ba875c609369035d49f48510192f2486f381456 /telecomm/java/android/telecom
parentbe36ebc28dd1f86da521401266fd03ca0b59825c (diff)
parent95e8a679335648388988337fcf08eac325768318 (diff)
downloadframeworks_base-e1678ddf7a8311c79ccba5a6b6183f9484fa1f1f.zip
frameworks_base-e1678ddf7a8311c79ccba5a6b6183f9484fa1f1f.tar.gz
frameworks_base-e1678ddf7a8311c79ccba5a6b6183f9484fa1f1f.tar.bz2
Merge "Handle MMI for multi-SIM (1/3)" into lmp-mr1-dev
Diffstat (limited to 'telecomm/java/android/telecom')
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index b771879..4eac5ac 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -895,6 +895,7 @@ public class TelecomManager {
* Processes the specified dial string as an MMI code.
* MMI codes are any sequence of characters entered into the dialpad that contain a "*" or "#".
* Some of these sequences launch special behavior through handled by Telephony.
+ * This method uses the default subscription.
* <p>
* Requires that the method-caller be set as the system dialer app.
* </p>
@@ -915,6 +916,31 @@ public class TelecomManager {
}
/**
+ * Processes the specified dial string as an MMI code.
+ * MMI codes are any sequence of characters entered into the dialpad that contain a "*" or "#".
+ * Some of these sequences launch special behavior through handled by Telephony.
+ * <p>
+ * Requires that the method-caller be set as the system dialer app.
+ * </p>
+ *
+ * @param accountHandle The handle for the account the MMI code should apply to.
+ * @param dialString The digits to dial.
+ * @return True if the digits were processed as an MMI code, false otherwise.
+ *
+ */
+ public boolean handleMmi(PhoneAccountHandle accountHandle, String dialString) {
+ ITelecomService service = getTelecomService();
+ if (service != null) {
+ try {
+ return service.handlePinMmiForPhoneAccount(accountHandle, dialString);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelecomService#handlePinMmi", e);
+ }
+ }
+ return false;
+ }
+
+ /**
* Removes the missed-call notification if one is present.
* <p>
* Requires that the method-caller be set as the system dialer app.