public void refreshServiceCache(String packageName) { Intent intent = new Intent("android.content.SyncAdapter"); if (packageName != null) { intent.setPackage(packageName); } generateServicesMap( VPackageManagerService.get().queryIntentServices( intent, null, PackageManager.GET_META_DATA, 0 ), mAppSyncAdapterInfos, new RegisteredServicesParser() ); }
boolean isPeriodic = mirror.android.content.SyncRequest.mIsPeriodic.get(request); long syncRunTimeSecs = mirror.android.content.SyncRequest.mSyncRunTimeSecs.get(request); if (!isAccountExist(userId, account, authority)) { return; int isSyncable = getIsSyncableAsUser(account, authority, userId); synchronized (mRecords) { Map<VSyncRecord.SyncRecordKey, VSyncRecord> map = mRecords.get(userId);
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(); } } } }
boolean isPeriodic = mirror.android.content.SyncRequest.mIsPeriodic.get(request); long syncRunTimeSecs = mirror.android.content.SyncRequest.mSyncRunTimeSecs.get(request); if (!isAccountExist(userId, account, authority)) { return; int isSyncable = getIsSyncableAsUser(account, authority, userId); synchronized (mRecords) { Map<VSyncRecord.SyncRecordKey, VSyncRecord> map = mRecords.get(userId);
public void refreshServiceCache(String packageName) { Intent intent = new Intent("android.content.SyncAdapter"); if (packageName != null) { intent.setPackage(packageName); } generateServicesMap( VPackageManagerService.get().queryIntentServices( intent, null, PackageManager.GET_META_DATA, 0 ), mAppSyncAdapterInfos, new RegisteredServicesParser() ); }
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(); } } } }
boolean isPeriodic = mirror.android.content.SyncRequest.mIsPeriodic.get(request); long syncRunTimeSecs = mirror.android.content.SyncRequest.mSyncRunTimeSecs.get(request); if (!isAccountExist(userId, account, authority)) { return; int isSyncable = getIsSyncableAsUser(account, authority, userId); synchronized (mRecords) { Map<VSyncRecord.SyncRecordKey, VSyncRecord> map = mRecords.get(userId);
public void refreshServiceCache(String packageName) { Intent intent = new Intent("android.content.SyncAdapter"); if (packageName != null) { intent.setPackage(packageName); } generateServicesMap( VPackageManagerService.get().queryIntentServices( intent, null, PackageManager.GET_META_DATA, 0 ), mAppSyncAdapterInfos, new RegisteredServicesParser() ); }
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(); } } } }