summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWysie <sohyuanchin@gmail.com>2010-05-27 22:31:50 +0800
committerSteve Kondik <shade@chemlab.org>2010-05-28 05:47:39 +0800
commite593846b9f8c975b9c228d19d0871a21dbedfb75 (patch)
tree595c19d75d8363e974363dbb1b153e515b24a212
parentbbf83a21c1194240e12190fb8c0201747e229e93 (diff)
downloadandroid_frameworks_base-e593846b9f8c975b9c228d19d0871a21dbedfb75.tar.gz
android_frameworks_base-e593846b9f8c975b9c228d19d0871a21dbedfb75.tar.bz2
android_frameworks_base-e593846b9f8c975b9c228d19d0871a21dbedfb75.zip
Fixed some code for the hidden SPN/PLMN, as well as added code to allow notification count colour to be changeable.
-rw-r--r--core/java/android/provider/Settings.java7
-rw-r--r--services/java/com/android/server/status/StatusBarIcon.java4
-rw-r--r--services/java/com/android/server/status/StatusBarService.java4
3 files changed, 13 insertions, 2 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 7b385f678e9..64e55fe4ab2 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1395,6 +1395,13 @@ public final class Settings {
/**
* Wysie_Soh
+ * Specifies notification count color
+ * @hide
+ */
+ public static final String NOTIF_COUNT_COLOR = "notif_count_color";
+
+ /**
+ * Wysie_Soh
* Specifies the date color
* @hide
*/
diff --git a/services/java/com/android/server/status/StatusBarIcon.java b/services/java/com/android/server/status/StatusBarIcon.java
index e18a182874b..083317494ab 100644
--- a/services/java/com/android/server/status/StatusBarIcon.java
+++ b/services/java/com/android/server/status/StatusBarIcon.java
@@ -35,6 +35,7 @@ class StatusBarIcon {
private TextView mNumberView;
private int clockColor = 0xff000000;
private int batteryPercentColor = 0xffffffff;
+ private int notifCountColor = 0xffffffff;
private Context mContext;
public StatusBarIcon(Context context, IconData data, ViewGroup parent) {
@@ -88,6 +89,9 @@ class StatusBarIcon {
mNumberView = nv;
if (data.number > 0) {
nv.setText("" + data.number);
+ notifCountColor = Settings.System.getInt(mContext.getContentResolver(),
+ Settings.System.NOTIF_COUNT_COLOR, notifCountColor);
+ nv.setTextColor(notifCountColor);
nv.setVisibility(View.VISIBLE);
} else {
nv.setVisibility(View.GONE);
diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java
index b11105bafb5..05f3efcadbb 100644
--- a/services/java/com/android/server/status/StatusBarService.java
+++ b/services/java/com/android/server/status/StatusBarService.java
@@ -1790,8 +1790,8 @@ public class StatusBarService extends IStatusBar.Stub
void updateNetworkName(boolean showSpn, String spn, boolean showPlmn, String plmn) {
// Double carrier
- mShowPlmnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_PLMN_SB, 0) == 1);
- mShowSpnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_SPN_SB, 0) == 1);
+ mShowPlmnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_PLMN_SB, 1) == 1);
+ mShowSpnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_SPN_SB, 1) == 1);
if (false) {
Log.d(TAG, "updateNetworkName showSpn=" + showSpn + " spn=" + spn
+ " ShowPlmn=" + showPlmn + " plmn=" + plmn);