From 514ad663f0a8b239cc59409175e0bd489c591aa0 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Thu, 13 May 2010 18:49:00 -0700 Subject: Set the visibility of the icons. Change-Id: Ib414718f1c51f1d306308a989d5d31d8e3ea7fd1 --- .../android/internal/statusbar/StatusBarIcon.java | 12 +++++++++- .../internal/statusbar/StatusBarIconList.java | 8 +------ .../policy/statusbar/phone/CommandQueue.java | 2 ++ .../statusbar/phone/PhoneStatusBarService.java | 10 -------- .../policy/statusbar/phone/StatusBarIconView.java | 5 ++++ .../server/status/StatusBarManagerService.java | 27 ++++++++++++++++++---- 6 files changed, 42 insertions(+), 22 deletions(-) diff --git a/core/java/com/android/internal/statusbar/StatusBarIcon.java b/core/java/com/android/internal/statusbar/StatusBarIcon.java index 330b407..455e17b 100644 --- a/core/java/com/android/internal/statusbar/StatusBarIcon.java +++ b/core/java/com/android/internal/statusbar/StatusBarIcon.java @@ -26,6 +26,7 @@ public class StatusBarIcon implements Parcelable { public String iconPackage; public int iconId; public int iconLevel; + public boolean visible = true; private StatusBarIcon() { } @@ -36,8 +37,15 @@ public class StatusBarIcon implements Parcelable { this.iconLevel = iconLevel; } + public String toString() { + return "StatusBarIcon(pkg=" + this.iconPackage + " id=0x" + Integer.toHexString(this.iconId) + + " level=" + this.iconLevel + " visible=" + visible + ")"; + } + public StatusBarIcon clone() { - return new StatusBarIcon(this.iconPackage, this.iconId, this.iconLevel); + StatusBarIcon that = new StatusBarIcon(this.iconPackage, this.iconId, this.iconLevel); + that.visible = this.visible; + return that; } /** @@ -51,12 +59,14 @@ public class StatusBarIcon implements Parcelable { this.iconPackage = in.readString(); this.iconId = in.readInt(); this.iconLevel = in.readInt(); + this.visible = in.readInt() != 0; } public void writeToParcel(Parcel out, int flags) { out.writeString(this.iconPackage); out.writeInt(this.iconId); out.writeInt(this.iconLevel); + out.writeInt(this.visible ? 1 : 0); } public int describeContents() { diff --git a/core/java/com/android/internal/statusbar/StatusBarIconList.java b/core/java/com/android/internal/statusbar/StatusBarIconList.java index 61002d5..478d245 100644 --- a/core/java/com/android/internal/statusbar/StatusBarIconList.java +++ b/core/java/com/android/internal/statusbar/StatusBarIconList.java @@ -155,13 +155,7 @@ public class StatusBarIconList implements Parcelable { final int N = mSlots.length; pw.println("Icon list:"); for (int i=0; i