VAccountManagerService.java 文件源码

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

项目:VirtualHook 作者:
private void generateServicesMap(List<ResolveInfo> services, Map<String, AuthenticatorInfo> map,
                                 IAccountParser accountParser) {
    for (ResolveInfo info : services) {
        XmlResourceParser parser = accountParser.getParser(mContext, info.serviceInfo,
                AccountManager.AUTHENTICATOR_META_DATA_NAME);
        if (parser != null) {
            try {
                AttributeSet attributeSet = Xml.asAttributeSet(parser);
                int type;
                while ((type = parser.next()) != XmlPullParser.END_DOCUMENT && type != XmlPullParser.START_TAG) {
                    // Nothing to do
                }
                if (AccountManager.AUTHENTICATOR_ATTRIBUTES_NAME.equals(parser.getName())) {
                    AuthenticatorDescription desc = parseAuthenticatorDescription(
                            accountParser.getResources(mContext, info.serviceInfo.applicationInfo),
                            info.serviceInfo.packageName, attributeSet);
                    if (desc != null) {
                        map.put(desc.type, new AuthenticatorInfo(desc, info.serviceInfo));
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号