Methods Summary |
---|
public void | copyFrom(com.android.internal.statusbar.StatusBarIconList that)
if (that.mSlots == null) {
this.mSlots = null;
this.mIcons = null;
} else {
final int N = that.mSlots.length;
this.mSlots = new String[N];
this.mIcons = new StatusBarIcon[N];
for (int i=0; i<N; i++) {
this.mSlots[i] = that.mSlots[i];
this.mIcons[i] = that.mIcons[i] != null ? that.mIcons[i].clone() : null;
}
}
|
public void | defineSlots(java.lang.String[] slots)
final int N = slots.length;
String[] s = mSlots = new String[N];
for (int i=0; i<N; i++) {
s[i] = slots[i];
}
mIcons = new StatusBarIcon[N];
|
public int | describeContents()
return 0;
|
public void | dump(java.io.PrintWriter pw)
final int N = mSlots.length;
pw.println("Icon list:");
for (int i=0; i<N; i++) {
pw.printf(" %2d: (%s) %s\n", i, mSlots[i], mIcons[i]);
}
|
public StatusBarIcon | getIcon(int index)
return mIcons[index];
|
public java.lang.String | getSlot(int index)
return mSlots[index];
|
public int | getSlotIndex(java.lang.String slot)
final int N = mSlots.length;
for (int i=0; i<N; i++) {
if (slot.equals(mSlots[i])) {
return i;
}
}
return -1;
|
public int | getViewIndex(int index)
int count = 0;
for (int i=0; i<index; i++) {
if (mIcons[i] != null) {
count++;
}
}
return count;
|
public void | readFromParcel(android.os.Parcel in)
this.mSlots = in.readStringArray();
final int N = in.readInt();
if (N < 0) {
mIcons = null;
} else {
mIcons = new StatusBarIcon[N];
for (int i=0; i<N; i++) {
if (in.readInt() != 0) {
mIcons[i] = new StatusBarIcon(in);
}
}
}
|
public void | removeIcon(int index)
mIcons[index] = null;
|
public void | setIcon(int index, StatusBarIcon icon)
mIcons[index] = icon.clone();
|
public int | size()
return mSlots.length;
|
public void | writeToParcel(android.os.Parcel out, int flags)
out.writeStringArray(mSlots);
if (mIcons == null) {
out.writeInt(-1);
} else {
final int N = mIcons.length;
out.writeInt(N);
for (int i=0; i<N; i++) {
StatusBarIcon ic = mIcons[i];
if (ic == null) {
out.writeInt(0);
} else {
out.writeInt(1);
ic.writeToParcel(out, flags);
}
}
}
|