AccountData.java 文件源码

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

项目:SafeSlinger-Android 作者:
public AccountData(Context ctx, String name, AuthenticatorDescription description) {
    mName = name;
    if (description != null) {
        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 = ctx.getPackageManager();

        if (description.labelId != 0) {
            mTypeLabel = pm.getText(packageName, description.labelId, null);
            if (mTypeLabel == null) {
                mTypeLabel = ctx.getString(R.string.label_undefinedTypeLabel);
            }
        } else {
            mTypeLabel = "";
        }

        if (description.iconId != 0) {
            mIcon = pm.getDrawable(packageName, description.iconId, null);
        } else {
            mIcon = ctx.getResources().getDrawable(android.R.drawable.sym_def_app_icon);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号