private void generateServicesMap(List<ResolveInfo> services, Map<String, SyncAdapterInfo> map, RegisteredServicesParser accountParser) { for (ResolveInfo info : services) { XmlResourceParser parser = accountParser.getParser(mContext, info.serviceInfo, "android.content.SyncAdapter"); 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 ("sync-adapter".equals(parser.getName())) { SyncAdapterType adapterType = parseSyncAdapterType( accountParser.getResources(mContext, info.serviceInfo.applicationInfo), attributeSet); if (adapterType != null) { String key = adapterType.accountType + "/" + adapterType.authority; map.put(key, new SyncAdapterInfo(adapterType, 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, SyncAdapterInfo> map, RegisteredServicesParser accountParser) { for (ResolveInfo info : services) { XmlResourceParser parser = accountParser.getParser(mContext, info.serviceInfo, "android.content.SyncAdapter"); 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 ("sync-adapter".equals(parser.getName())) { SyncAdapterType adapterType = parseSyncAdapterType( accountParser.getResources(mContext, info.serviceInfo.applicationInfo), attributeSet); if (adapterType != null) { String key = adapterType.accountType + "/" + adapterType.authority; map.put(key, new SyncAdapterInfo(adapterType, info.serviceInfo)); } } } catch (Exception e) { e.printStackTrace(); } } } }
private void generateServicesMap(List<ResolveInfo> services, Map<String, SyncAdapterInfo> map, RegisteredServicesParser accountParser) { for (ResolveInfo info : services) { XmlResourceParser parser = accountParser.getParser(mContext, info.serviceInfo, "android.content.SyncAdapter"); 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 ("sync-adapter".equals(parser.getName())) { SyncAdapterType adapterType = parseSyncAdapterType( accountParser.getResources(mContext, info.serviceInfo.applicationInfo), attributeSet); if (adapterType != null) { String key = adapterType.accountType + "/" + adapterType.authority; map.put(key, new SyncAdapterInfo(adapterType, 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(); } } } }