ModStatusbarColor.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:GravityBox 作者:
private static Drawable getColoredDrawable(Context ctx, String pkg, Icon icon) {
    if (icon == null) return null;

    Drawable d = null;
    if (pkg == null || PACKAGE_NAME.equals(pkg)) {
        final int iconId = (int) XposedHelpers.callMethod(icon, "getResId");
        d = SysUiManagers.IconManager.getBasicIcon(iconId);
        if (d != null) {
            return d;
        }
    }
    d = icon.loadDrawable(ctx);
    if (d != null) {
        if (SysUiManagers.IconManager.isColoringEnabled()) {
            d = SysUiManagers.IconManager.applyColorFilter(d.mutate(),
                    PorterDuff.Mode.SRC_IN);
        } else {
            d.clearColorFilter();
        }
    }
    return d;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号