summaryrefslogtreecommitdiffstats
path: root/telephony/java/android/telephony/SubscriptionManager.java
diff options
context:
space:
mode:
authorStuart Scott <stuartscott@google.com>2014-10-28 09:29:01 -0700
committerStuart Scott <stuartscott@google.com>2014-11-07 23:53:39 +0000
commitab45ec177a787fee046f6a9c4d1098d529aff7bb (patch)
tree82751bfeebb2f9eaabcf02806c72fc3b5c1908a6 /telephony/java/android/telephony/SubscriptionManager.java
parent3eed90f39301089a1c16d6e2c0d027b187567cf0 (diff)
downloadframeworks_base-ab45ec177a787fee046f6a9c4d1098d529aff7bb.zip
frameworks_base-ab45ec177a787fee046f6a9c4d1098d529aff7bb.tar.gz
frameworks_base-ab45ec177a787fee046f6a9c4d1098d529aff7bb.tar.bz2
SubInfoRecord provides a tinted icon with the initial embossed.
bug: 17575308 Change-Id: I895975dfe8d1c4db8381ef9322bd72c8fcb3e22c
Diffstat (limited to 'telephony/java/android/telephony/SubscriptionManager.java')
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java74
1 files changed, 6 insertions, 68 deletions
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 5643cb9..21d225d 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -246,13 +246,6 @@ public class SubscriptionManager implements BaseColumns {
*/
public static final String MNC = "mnc";
-
- private static final int RES_TYPE_BACKGROUND_DARK = 0;
-
- private static final int RES_TYPE_BACKGROUND_LIGHT = 1;
-
- private static final int[] sSimBackgroundDarkRes = setSimResource(RES_TYPE_BACKGROUND_DARK);
-
/**
* Broadcast Action: The user has changed one of the default subs related to
* data, phone calls, or sms</p>
@@ -476,17 +469,16 @@ public class SubscriptionManager implements BaseColumns {
}
/**
- * Set SIM color by simInfo index
- * @param color the rgb value of color of the SIM
+ * Set SIM icon tint color by simInfo index
+ * @param tint the rgb value of icon tint color of the SIM
* @param subId the unique SubInfoRecord index in database
* @return the number of records updated
* @hide
*/
- public static int setColor(int color, int subId) {
- if (VDBG) logd("[setColor]+ color:" + color + " subId:" + subId);
- int size = sSimBackgroundDarkRes.length;
+ public static int setIconTint(int tint, int subId) {
+ if (VDBG) logd("[setIconTint]+ tint:" + tint + " subId:" + subId);
if (!isValidSubId(subId)) {
- logd("[setColor]- fail");
+ logd("[setIconTint]- fail");
return -1;
}
@@ -495,7 +487,7 @@ public class SubscriptionManager implements BaseColumns {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
- result = iSub.setColor(color, subId);
+ result = iSub.setIconTint(tint, subId);
}
} catch (RemoteException ex) {
// ignore it
@@ -579,35 +571,6 @@ public class SubscriptionManager implements BaseColumns {
}
/**
- * Set number display format. 0: none, 1: the first four digits, 2: the last four digits
- * @param format the display format of phone number
- * @param subId the unique SubInfoRecord index in database
- * @return the number of records updated
- * @hide
- */
- public static int setDisplayNumberFormat(int format, int subId) {
- if (VDBG) logd("[setDisplayNumberFormat]+ format:" + format + " subId:" + subId);
- if (format < 0 || !isValidSubId(subId)) {
- logd("[setDisplayNumberFormat]- fail, return -1");
- return -1;
- }
-
- int result = 0;
-
- try {
- ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
- if (iSub != null) {
- result = iSub.setDisplayNumberFormat(format, subId);
- }
- } catch (RemoteException ex) {
- // ignore it
- }
-
- return result;
-
- }
-
- /**
* Set data roaming by simInfo index
* @param roaming 0:Don't allow data when roaming, 1:Allow data when roaming
* @param subId the unique SubInfoRecord index in database
@@ -704,31 +667,6 @@ public class SubscriptionManager implements BaseColumns {
}
- private static int[] setSimResource(int type) {
- int[] simResource = null;
-
- switch (type) {
- case RES_TYPE_BACKGROUND_DARK:
- simResource = new int[] {
- com.android.internal.R.drawable.sim_dark_blue,
- com.android.internal.R.drawable.sim_dark_orange,
- com.android.internal.R.drawable.sim_dark_green,
- com.android.internal.R.drawable.sim_dark_purple
- };
- break;
- case RES_TYPE_BACKGROUND_LIGHT:
- simResource = new int[] {
- com.android.internal.R.drawable.sim_light_blue,
- com.android.internal.R.drawable.sim_light_orange,
- com.android.internal.R.drawable.sim_light_green,
- com.android.internal.R.drawable.sim_light_purple
- };
- break;
- }
-
- return simResource;
- }
-
private static void logd(String msg) {
Rlog.d(LOG_TAG, "[SubManager] " + msg);
}