diff options
author | Wink Saville <wink@google.com> | 2014-09-02 22:37:08 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2014-09-02 22:46:42 -0700 |
commit | c650e0b12a656060de767d91d99f6b33e51c6ab2 (patch) | |
tree | a5f149e0b4677a80c0067c1df200011f38045d87 /telephony/java/com | |
parent | f0e57e10edb0f76d1675285d352bba69838d407c (diff) | |
download | frameworks_base-c650e0b12a656060de767d91d99f6b33e51c6ab2.zip frameworks_base-c650e0b12a656060de767d91d99f6b33e51c6ab2.tar.gz frameworks_base-c650e0b12a656060de767d91d99f6b33e51c6ab2.tar.bz2 |
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
Diffstat (limited to 'telephony/java/com')
3 files changed, 32 insertions, 11 deletions
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<SubInfoRecord> getActivatedSubInfoList(); + List<SubInfoRecord> 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:</p> + * <ul> + * <li><em>subscription</em> - A int, the current sms default subscription.</li> + * </ul> + */ + public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED + = "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED"; } |