From c650e0b12a656060de767d91d99f6b33e51c6ab2 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Tue, 2 Sep 2014 22:37:08 -0700 Subject: Prepare to make SubscriptionManager public. Sync SubscriptionManager and its dependentes between lmp-dev and lmp-sprout-dev. In SubscriptionManager and SubscriptionController: -Rename getActivatedSubInfoList to getActiveSubInfoList. -Remove context as a parameter -Cleanup Change-Id: Ie06ced3e7ff5a3d06b3b47892fed22b4bb8972c7 --- .../java/com/android/internal/telephony/ISub.aidl | 19 +++++++++++++++++-- .../android/internal/telephony/PhoneConstants.java | 14 +++++--------- .../android/internal/telephony/TelephonyIntents.java | 10 ++++++++++ 3 files changed, 32 insertions(+), 11 deletions(-) (limited to 'telephony/java/com') diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl index 6021ccf..507b017 100755 --- a/telephony/java/com/android/internal/telephony/ISub.aidl +++ b/telephony/java/com/android/internal/telephony/ISub.aidl @@ -56,7 +56,7 @@ interface ISub { * @param context Context provided by caller * @return Array list of currently inserted SubInfoRecord(s) */ - List getActivatedSubInfoList(); + List getActiveSubInfoList(); /** * Get the SUB count of all SUB(s) in subinfo database @@ -66,6 +66,13 @@ interface ISub { int getAllSubInfoCount(); /** + * Get the count of activated SUB(s) + * @param context Context provided by caller + * @return activated SIM count + */ + int getActivatedSubInfoCount(); + + /** * Add a new SubInfoRecord to subinfo database if needed * @param context Context provided by caller * @param iccId the IccId of the SIM card @@ -109,7 +116,7 @@ interface ISub { * @param subId the unique SubInfoRecord index in database * @return the number of records updated */ - int setDispalyNumber(String number, long subId); + int setDisplayNumber(String number, long subId); /** * Set number display format. 0: none, 1: the first four digits, 2: the last four digits @@ -150,4 +157,12 @@ interface ISub { long getDefaultVoiceSubId(); void setDefaultVoiceSubId(long subId); + + long getDefaultSmsSubId(); + + void setDefaultSmsSubId(long subId); + + void clearDefaultsForInactiveSubIds(); + + long[] getActivatedSubIdList(); } diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java index b4b1ea5..62b5596 100644 --- a/telephony/java/com/android/internal/telephony/PhoneConstants.java +++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java @@ -136,14 +136,6 @@ public class PhoneConstants { /** APN type for IA Emergency PDN */ public static final String APN_TYPE_EMERGENCY = "emergency"; - // FIXME: This looks to be used as default phoneId, rename - // or use SubscriptionManager.DEFAULT_SUB_ID - public static final int DEFAULT_SUBSCRIPTION = 0; - - // FIXME: This looks to be used as invalid phoneId, rename - // or use SubscriptionManager.INVALID_SUB_ID - public static final int INVALID_SUBSCRIPTION = -1; - public static final int RIL_CARD_MAX_APPS = 8; public static final int DEFAULT_CARD_INDEX = 0; @@ -154,10 +146,14 @@ public class PhoneConstants { public static final int MAX_PHONE_COUNT_TRI_SIM = 3; - public static final String SUBSCRIPTION_KEY = "subscription"; + public static final String PHONE_KEY = "phone"; public static final String SLOT_KEY = "slot"; + // FIXME: This is used to pass a subId via intents, we need to look at its usage, which is + // FIXME: extensive, and see if this should be an array of all active subId's or ...? + public static final String SUBSCRIPTION_KEY = "subscription"; + public static final String SUB_SETTING = "subSettings"; public static final int SUB1 = 0; diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java index 85ceefd..e7aca90 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java +++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java @@ -391,4 +391,14 @@ public class TelephonyIntents { */ public static final String ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED = "android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED"; + + /** + * Broadcast Action: The default sms subscription has changed. This has the following + * extra values:

+ *
    + *
  • subscription - A int, the current sms default subscription.
  • + *
+ */ + public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED + = "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED"; } -- cgit v1.1