ContactAdderFragment.java 文件源码

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

项目:asstudydemo 作者:
public AccountData(String name, AuthenticatorDescription description) {
    mName = name;
    if (null != description) {
        mType = description.type;
        // The type string is stored in a resource, so we need to convert it into something human readable.
        String packageName = description.packageName;
        PackageManager pm = getActivity().getPackageManager();
        if (description.labelId != 0) {
            mTypeLabel = pm.getText(packageName, description.labelId, null);
            if (null == mTypeLabel) {
                throw new IllegalArgumentException("LabelID provided, but label not fount");
            }
        } else {
            mTypeLabel = "";
        }

        if (description.iconId != 0) {
            mIcon = pm.getDrawable(packageName, description.iconId, null);
            if (null == mIcon) {
                throw new IllegalArgumentException("IconID provided, but drawable not found");
            }
        } else {
            mIcon = getResources().getDrawable(android.R.drawable.sym_def_app_icon);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号