private void generateServicesMap(List<ResolveInfo> services, Map<String, AuthenticatorInfo> map, RegisteredServicesParser 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(); } } } }
private void generateServicesMap(List<ResolveInfo> services, Map<String, AuthenticatorInfo> map, RegisteredServicesParser 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(); } } } }
private void generateServicesMap(List<ResolveInfo> services, Map<String, AuthenticatorInfo> map, RegisteredServicesParser 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(); } } } }