Tabnine Logo
VContentService
Code IndexAdd Tabnine to your IDE (free)

How to use
VContentService
in
com.lody.virtual.server.accounts

Best Java code snippets using com.lody.virtual.server.accounts.VContentService (Showing top 9 results out of 315)

origin: android-hacker/VirtualXposed

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()
  );
}
origin: android-hacker/VirtualXposed

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);
origin: android-hacker/VirtualXposed

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();
      }
    }
  }
}
origin: darkskygit/VirtualApp

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);
origin: darkskygit/VirtualApp

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()
  );
}
origin: bzsome/VirtualApp-x326

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();
      }
    }
  }
}
origin: bzsome/VirtualApp-x326

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);
origin: bzsome/VirtualApp-x326

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()
  );
}
origin: darkskygit/VirtualApp

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();
      }
    }
  }
}
com.lody.virtual.server.accountsVContentService

Most used methods

  • generateServicesMap
  • getIsSyncableAsUser
  • isAccountExist
  • parseSyncAdapterType

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Option (scala)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now