summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java3
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java43
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSession.aidl14
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl6
4 files changed, 58 insertions, 8 deletions
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index abf1ead..20cd037 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.NonNull;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
@@ -1064,7 +1065,7 @@ public class SubscriptionManager {
* is never null but the length maybe 0.
* @hide
*/
- public int[] getActiveSubscriptionIdList() {
+ public @NonNull int[] getActiveSubscriptionIdList() {
int[] subId = null;
try {
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 751e11b..73e3213 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
@@ -40,6 +41,7 @@ import com.android.internal.telephony.TelephonyProperties;
import java.io.FileInputStream;
import java.io.IOException;
+import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -1879,6 +1881,23 @@ public class TelephonyManager {
}
/**
+ * Return the set of subscriber IDs that should be considered as "merged
+ * together" for data usage purposes. This is commonly {@code null} to
+ * indicate no merging is required. Any returned subscribers are sorted in a
+ * deterministic order.
+ *
+ * @hide
+ */
+ public @Nullable String[] getMergedSubscriberIds() {
+ try {
+ return getITelephony().getMergedSubscriberIds();
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return null;
+ }
+
+ /**
* Returns the MSISDN string.
* for a GSM phone. Return null if it is unavailable.
* <p>
@@ -3490,8 +3509,15 @@ public class TelephonyManager {
/** @hide */
@SystemApi
public void setDataEnabled(boolean enable) {
+ setDataEnabled(SubscriptionManager.getDefaultDataSubId(), enable);
+ }
+
+ /** @hide */
+ @SystemApi
+ public void setDataEnabled(int subId, boolean enable) {
try {
- getITelephony().setDataEnabled(enable);
+ Log.d(TAG, "setDataEnabled: enabled=" + enable);
+ getITelephony().setDataEnabled(subId, enable);
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelephony#setDataEnabled", e);
}
@@ -3500,12 +3526,21 @@ public class TelephonyManager {
/** @hide */
@SystemApi
public boolean getDataEnabled() {
+ return getDataEnabled(SubscriptionManager.getDefaultDataSubId());
+ }
+
+ /** @hide */
+ @SystemApi
+ public boolean getDataEnabled(int subId) {
+ boolean retVal;
try {
- return getITelephony().getDataEnabled();
+ retVal = getITelephony().getDataEnabled(subId);
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelephony#getDataEnabled", e);
+ retVal = false;
}
- return false;
+ Log.d(TAG, "getDataEnabled: retVal=" + retVal);
+ return retVal;
}
/**
@@ -3593,5 +3628,3 @@ public class TelephonyManager {
}
}
}
-
-
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index d1946e3..b1f2d32 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -223,6 +223,20 @@ interface IImsCallSession {
void sendDtmf(char c, in Message result);
/**
+ * Start a DTMF code. According to <a href="http://tools.ietf.org/html/rfc2833">RFC 2833</a>,
+ * event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
+ * and event flash to 16. Currently, event flash is not supported.
+ *
+ * @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
+ */
+ void startDtmf(char c);
+
+ /**
+ * Stop a DTMF code.
+ */
+ void stopDtmf();
+
+ /**
* Sends an USSD message.
*
* @param ussdMessage USSD message to send
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index bf7f332..4affad8 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -679,14 +679,14 @@ interface ITelephony {
*
* @param enable true to turn on, else false
*/
- void setDataEnabled(boolean enable);
+ void setDataEnabled(int subId, boolean enable);
/**
* Get the user enabled state of Mobile Data.
*
* @return true on enabled
*/
- boolean getDataEnabled();
+ boolean getDataEnabled(int subId);
/**
* Get P-CSCF address from PCO after data connection is established or modified.
@@ -772,6 +772,8 @@ interface ITelephony {
*/
String getLine1AlphaTagForDisplay(int subId);
+ String[] getMergedSubscriberIds();
+
/**
* Override the operator branding for the current ICCID.
*