summaryrefslogtreecommitdiffstats
path: root/telephony/java/android/telephony/SubscriptionManager.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2014-12-02 18:30:14 -0800
committerJeff Sharkey <jsharkey@android.com>2014-12-08 08:42:59 -0800
commit3256601f5e4d94713f59e97b9d4912875c1bdcaf (patch)
treef1419e55b5b45e0b8485845ad21b72eadeccd977 /telephony/java/android/telephony/SubscriptionManager.java
parent9eb2092ea146faa21b8c6e0e512c03fc67a09dda (diff)
downloadframeworks_base-3256601f5e4d94713f59e97b9d4912875c1bdcaf.zip
frameworks_base-3256601f5e4d94713f59e97b9d4912875c1bdcaf.tar.gz
frameworks_base-3256601f5e4d94713f59e97b9d4912875c1bdcaf.tar.bz2
Offer to "merge" subscribers for data usage.
There are some cases where multiple subscriber identities (IMSI) should be treated as "merged together" from a data usage perspective. This is done by extending the template used for matching purposes to support multiple subscribers. Then, when we query historical usage or set network policies, we normalize the matching template to merge to any other identities that should be included. When normalizing, the "lowest" identity is always used for equality and storage purposes, which allows identities to come and go over time. This change also fixes data usage recording for multi-SIM devices by passing along the concrete subscriber identity for each network interface. Also correctly create default policies for multi-SIM devices. This change also drops setPolicyDataEnable() until it can be wired up to the right underlying NetworkAgent. (This means we still bring up the network, and then rely on iptables rules to block traffic when over the limit, instead of proactively disabling the connection.) Bug: 18012787 Change-Id: If6acf32009fdfea2b836f5aff8e2f3e5e0248b4a
Diffstat (limited to 'telephony/java/android/telephony/SubscriptionManager.java')
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java3
1 files changed, 2 insertions, 1 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 {