NotificationFixer.java 文件源码

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

项目:container 作者:
@TargetApi(Build.VERSION_CODES.M)
    void fixIcon(Icon icon, Context pluginContext, boolean isInstall) {
        if (icon == null) return;
        int type = Reflect.on(icon).get("mType");
//        Log.i(TAG, "smallIcon type=" + type);
        if (type == 2) {
            if (isInstall) {
                Reflect.on(icon).set("mObj1", pluginContext.getResources());
                Reflect.on(icon).set("mString1", pluginContext.getPackageName());
            } else {
                Drawable drawable = icon.loadDrawable(pluginContext);
                Bitmap bitmap = drawableToBitMap(drawable);
                Reflect.on(icon).set("mObj1", bitmap);
                Reflect.on(icon).set("mString1", null);
                Reflect.on(icon).set("mType", 1);
            }
        }
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号