use of com.android.systemui.statusbar.StatusBarIconView in project android_frameworks_base by AOSPA.
the class StatusBarIconController method dump.
public void dump(PrintWriter pw) {
int N = mStatusIcons.getChildCount();
pw.println(" icon views: " + N);
for (int i = 0; i < N; i++) {
StatusBarIconView ic = (StatusBarIconView) mStatusIcons.getChildAt(i);
pw.println(" [" + i + "] icon=" + ic);
}
super.dump(pw);
}
use of com.android.systemui.statusbar.StatusBarIconView in project android_frameworks_base by AOSPA.
the class StatusBarIconController method applyIconTint.
private void applyIconTint() {
for (int i = 0; i < mStatusIcons.getChildCount(); i++) {
StatusBarIconView v = (StatusBarIconView) mStatusIcons.getChildAt(i);
v.setImageTintList(ColorStateList.valueOf(getTint(mTintArea, v, mIconTint)));
}
mSignalCluster.setIconTint(mIconTint, mDarkIntensity, mTintArea);
mBatteryMeterView.setDarkIntensity(isInArea(mTintArea, mBatteryMeterView) ? mDarkIntensity : 0);
mClock.setTextColor(getTint(mTintArea, mClock, mIconTint));
mBatteryLevelView.setTextColor(getTint(mTintArea, mBatteryLevelView, mIconTint));
}
use of com.android.systemui.statusbar.StatusBarIconView in project android_frameworks_base by AOSPA.
the class StatusBarIconController method handleSet.
private void handleSet(int index, StatusBarIcon icon) {
int viewIndex = getViewIndex(index);
StatusBarIconView view = (StatusBarIconView) mStatusIcons.getChildAt(viewIndex);
view.set(icon);
view = (StatusBarIconView) mStatusIconsKeyguard.getChildAt(viewIndex);
view.set(icon);
applyIconTint();
}
use of com.android.systemui.statusbar.StatusBarIconView in project android_frameworks_base by AOSPA.
the class StatusBarIconController method addSystemIcon.
private void addSystemIcon(int index, StatusBarIcon icon) {
String slot = getSlot(index);
int viewIndex = getViewIndex(index);
boolean blocked = mIconBlacklist.contains(slot);
StatusBarIconView view = new StatusBarIconView(mContext, slot, null, blocked);
view.set(icon);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize);
lp.setMargins(mIconHPadding, 0, mIconHPadding, 0);
mStatusIcons.addView(view, viewIndex, lp);
view = new StatusBarIconView(mContext, slot, null, blocked);
view.set(icon);
mStatusIconsKeyguard.addView(view, viewIndex, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize));
applyIconTint();
}
use of com.android.systemui.statusbar.StatusBarIconView in project android_frameworks_base by AOSPA.
the class NotificationIconAreaController method applyNotificationIconsTint.
/**
* Applies {@link #mIconTint} to the notification icons.
*/
private void applyNotificationIconsTint() {
for (int i = 0; i < mNotificationIcons.getChildCount(); i++) {
StatusBarIconView v = (StatusBarIconView) mNotificationIcons.getChildAt(i);
boolean isPreL = Boolean.TRUE.equals(v.getTag(R.id.icon_is_pre_L));
boolean colorize = !isPreL || NotificationUtils.isGrayscale(v, mNotificationColorUtil);
if (colorize) {
v.setImageTintList(ColorStateList.valueOf(StatusBarIconController.getTint(mTintArea, v, mIconTint)));
}
}
}
Aggregations