diff options
| author | 2019-04-10 10:50:01 -0700 | |
|---|---|---|
| committer | 2019-04-10 14:40:59 -0700 | |
| commit | 5d8f6447a7e5e90d74cda99173adb1535a2770a7 (patch) | |
| tree | 4fa890cbcf7ea056df12094202c96f7d3d531309 | |
| parent | 21df04365d9350c5d51f6fc1022590dbbcf30b34 (diff) | |
Fixed the incorrect function signature
The name source should be an integer instead of long
Test: Manual + unit tests
Bug: 130237749
Change-Id: Ic4447da24073d37401ae0f6e8f8b41bd60d7167d
3 files changed, 10 insertions, 35 deletions
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java index ee28ca23be35..cf15b92ae640 100644 --- a/telephony/java/android/telephony/SubscriptionInfo.java +++ b/telephony/java/android/telephony/SubscriptionInfo.java @@ -87,8 +87,8 @@ public class SubscriptionInfo implements Parcelable { private int mCarrierId; /** - * The source of the name, NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE, - * NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT. + * The source of the name, NAME_SOURCE_DEFAULT_SOURCE, NAME_SOURCE_SIM_SOURCE or + * NAME_SOURCE_USER_INPUT. */ private int mNameSource; @@ -103,7 +103,7 @@ public class SubscriptionInfo implements Parcelable { private String mNumber; /** - * Data roaming state, DATA_RAOMING_ENABLE, DATA_RAOMING_DISABLE + * Data roaming state, DATA_ROAMING_ENABLE, DATA_ROAMING_DISABLE */ private int mDataRoaming; @@ -306,8 +306,8 @@ public class SubscriptionInfo implements Parcelable { } /** - * @return the source of the name, eg NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE, - * NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT. + * @return the source of the name, eg NAME_SOURCE_DEFAULT_SOURCE, NAME_SOURCE_SIM_SOURCE or + * NAME_SOURCE_USER_INPUT. * @hide */ @UnsupportedAppUsage @@ -316,8 +316,8 @@ public class SubscriptionInfo implements Parcelable { } /** - * Creates and returns an icon {@code Bitmap} to represent this {@code SubscriptionInfo} in a user - * interface. + * Creates and returns an icon {@code Bitmap} to represent this {@code SubscriptionInfo} in a + * user interface. * * @param context A {@code Context} to get the {@code DisplayMetrics}s from. * diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index 57c84a638f12..0c6341111029 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -364,12 +364,6 @@ public class SubscriptionManager { public static final String NAME_SOURCE = "name_source"; /** - * The name_source is undefined - * @hide - */ - public static final int NAME_SOURCE_UNDEFINDED = -1; - - /** * The name_source is the default * @hide */ @@ -1598,27 +1592,16 @@ public class SubscriptionManager { } /** - * Set display name by simInfo index - * @param displayName the display name of SIM card - * @param subId the unique SubscriptionInfo index in database - * @return the number of records updated - * @hide - */ - public int setDisplayName(String displayName, int subId) { - return setDisplayName(displayName, subId, NAME_SOURCE_UNDEFINDED); - } - - /** * Set display name by simInfo index with name source * @param displayName the display name of SIM card * @param subId the unique SubscriptionInfo index in database * @param nameSource 0: NAME_SOURCE_DEFAULT_SOURCE, 1: NAME_SOURCE_SIM_SOURCE, - * 2: NAME_SOURCE_USER_INPUT, -1 NAME_SOURCE_UNDEFINED + * 2: NAME_SOURCE_USER_INPUT * @return the number of records updated or < 0 if invalid subId * @hide */ @UnsupportedAppUsage - public int setDisplayName(String displayName, int subId, long nameSource) { + public int setDisplayName(String displayName, int subId, int nameSource) { if (VDBG) { logd("[setDisplayName]+ displayName:" + displayName + " subId:" + subId + " nameSource:" + nameSource); diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl index 01fdae800972..cfba0529e664 100755 --- a/telephony/java/com/android/internal/telephony/ISub.aidl +++ b/telephony/java/com/android/internal/telephony/ISub.aidl @@ -145,21 +145,13 @@ interface ISub { int setIconTint(int tint, int subId); /** - * Set display name by simInfo index - * @param displayName the display name of SIM card - * @param subId the unique SubscriptionInfo index in database - * @return the number of records updated - */ - int setDisplayName(String displayName, int subId); - - /** * Set display name by simInfo index with name source * @param displayName the display name of SIM card * @param subId the unique SubscriptionInfo index in database * @param nameSource, 0: DEFAULT_SOURCE, 1: SIM_SOURCE, 2: USER_INPUT * @return the number of records updated */ - int setDisplayNameUsingSrc(String displayName, int subId, long nameSource); + int setDisplayNameUsingSrc(String displayName, int subId, int nameSource); /** * Set phone number by subId |