congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
VPackageManagerService.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
com.lody.virtual.server.pm.VPackageManagerService

Best Java code snippets using com.lody.virtual.server.pm.VPackageManagerService.get (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

public void refreshAuthenticatorCache(String packageName) {
  cache.authenticators.clear();
  Intent intent = new Intent(AccountManager.ACTION_AUTHENTICATOR_INTENT);
  if (packageName != null) {
    intent.setPackage(packageName);
  }
  generateServicesMap(
      VPackageManagerService.get().queryIntentServices(intent, null, PackageManager.GET_META_DATA, 0),
      cache.authenticators, new RegisteredServicesParser());
}
origin: android-hacker/VirtualXposed

@Override
public void processRestarted(String packageName, String processName, int userId) {
  int callingPid = getCallingPid();
  int appId = VAppManagerService.get().getAppId(packageName);
  int uid = VUserHandle.getUid(userId, appId);
  synchronized (this) {
    ProcessRecord app = findProcessLocked(callingPid);
    if (app == null) {
      ApplicationInfo appInfo = VPackageManagerService.get().getApplicationInfo(packageName, 0, userId);
      appInfo.flags |= ApplicationInfo.FLAG_HAS_CODE;
      String stubProcessName = getProcessName(callingPid);
      int vpid = parseVPid(stubProcessName);
      if (vpid != -1) {
        performStartProcessLocked(uid, vpid, appInfo, processName);
      }
    }
  }
}
origin: android-hacker/VirtualXposed

ProcessRecord startProcessIfNeedLocked(String processName, int userId, String packageName) {
  if (VActivityManagerService.get().getFreeStubCount() < 3) {
    // run GC
    killAllApps();
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  ApplicationInfo info = VPackageManagerService.get().getApplicationInfo(packageName, 0, userId);
  if (ps == null || info == null) {
    return null;
  }
  if (!ps.isLaunched(userId)) {
    sendFirstLaunchBroadcast(ps, userId);
    ps.setLaunched(userId, true);
    VAppManagerService.get().savePersistenceData();
  }
  int uid = VUserHandle.getUid(userId, ps.appId);
  ProcessRecord app = mProcessNames.get(processName, uid);
  if (app != null && app.client.asBinder().pingBinder()) {
    return app;
  }
  int vpid = queryFreeStubProcessLocked();
  if (vpid == -1) {
    return null;
  }
  app = performStartProcessLocked(uid, vpid, info, processName);
  if (app != null) {
    app.pkgList.add(info.packageName);
  }
  return app;
}
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: darkskygit/VirtualApp

@Override
public void processRestarted(String packageName, String processName, int userId) {
  int callingPid = getCallingPid();
  int appId = VAppManagerService.get().getAppId(packageName);
  int uid = VUserHandle.getUid(userId, appId);
  synchronized (this) {
    ProcessRecord app = findProcessLocked(callingPid);
    if (app == null) {
      ApplicationInfo appInfo = VPackageManagerService.get().getApplicationInfo(packageName, 0, userId);
      appInfo.flags |= ApplicationInfo.FLAG_HAS_CODE;
      String stubProcessName = getProcessName(callingPid);
      int vpid = parseVPid(stubProcessName);
      if (vpid != -1) {
        performStartProcessLocked(uid, vpid, appInfo, processName);
      }
    }
  }
}
origin: android-hacker/VirtualXposed

  public static VPackage remove(String packageName) {
    synchronized (PackageCacheManager.class) {
      VPackageManagerService.get().deletePackageLocked(packageName);
      return PACKAGE_CACHE.remove(packageName);
    }
  }
}
origin: bzsome/VirtualApp-x326

@Override
public void processRestarted(String packageName, String processName, int userId) {
  int callingPid = getCallingPid();
  int appId = VAppManagerService.get().getAppId(packageName);
  int uid = VUserHandle.getUid(userId, appId);
  synchronized (this) {
    ProcessRecord app = findProcessLocked(callingPid);
    if (app == null) {
      ApplicationInfo appInfo = VPackageManagerService.get().getApplicationInfo(packageName, 0, userId);
      appInfo.flags |= ApplicationInfo.FLAG_HAS_CODE;
      String stubProcessName = getProcessName(callingPid);
      int vpid = parseVPid(stubProcessName);
      if (vpid != -1) {
        performStartProcessLocked(uid, vpid, appInfo, processName);
      }
    }
  }
}
origin: android-hacker/VirtualXposed

public static void put(VPackage pkg, PackageSetting ps) {
  synchronized (PackageCacheManager.class) {
    PackageParserEx.initApplicationInfoBase(ps, pkg);
    PACKAGE_CACHE.put(pkg.packageName, pkg);
    pkg.mExtras = ps;
    VPackageManagerService.get().analyzePackageLocked(pkg);
  }
}
origin: darkskygit/VirtualApp

ProcessRecord startProcessIfNeedLocked(String processName, int userId, String packageName) {
  if (VActivityManagerService.get().getFreeStubCount() < 3) {
    // run GC
    killAllApps();
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  ApplicationInfo info = VPackageManagerService.get().getApplicationInfo(packageName, 0, userId);
  if (ps == null || info == null) {
    return null;
  }
  if (!ps.isLaunched(userId)) {
    sendFirstLaunchBroadcast(ps, userId);
    ps.setLaunched(userId, true);
    VAppManagerService.get().savePersistenceData();
  }
  int uid = VUserHandle.getUid(userId, ps.appId);
  ProcessRecord app = mProcessNames.get(processName, uid);
  if (app != null && app.client.asBinder().pingBinder()) {
    return app;
  }
  int vpid = queryFreeStubProcessLocked();
  if (vpid == -1) {
    return null;
  }
  app = performStartProcessLocked(uid, vpid, info, processName);
  if (app != null) {
    app.pkgList.add(info.packageName);
  }
  return app;
}
origin: android-hacker/VirtualXposed

@Override
public boolean onCreate() {
  Context context = getContext();
  DaemonService.startup(context);
  if (!VirtualCore.get().isStartup()) {
    return true;
  }
  VPackageManagerService.systemReady();
  addService(ServiceManagerNative.PACKAGE, VPackageManagerService.get());
  VActivityManagerService.systemReady(context);
  addService(ServiceManagerNative.ACTIVITY, VActivityManagerService.get());
  addService(ServiceManagerNative.USER, VUserManagerService.get());
  VAppManagerService.systemReady();
  addService(ServiceManagerNative.APP, VAppManagerService.get());
  BroadcastSystem.attach(VActivityManagerService.get(), VAppManagerService.get());
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    addService(ServiceManagerNative.JOB, VJobSchedulerService.get());
  }
  VNotificationManagerService.systemReady(context);
  addService(ServiceManagerNative.NOTIFICATION, VNotificationManagerService.get());
  VAppManagerService.get().scanApps();
  VAccountManagerService.systemReady();
  addService(ServiceManagerNative.ACCOUNT, VAccountManagerService.get());
  addService(ServiceManagerNative.VS, VirtualStorageService.get());
  addService(ServiceManagerNative.DEVICE, VDeviceManagerService.get());
  addService(ServiceManagerNative.VIRTUAL_LOC, VirtualLocationService.get());
  return true;
}
origin: bzsome/VirtualApp-x326

ProcessRecord startProcessIfNeedLocked(String processName, int userId, String packageName) {
  if (VActivityManagerService.get().getFreeStubCount() < 3) {
    // run GC
    killAllApps();
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  ApplicationInfo info = VPackageManagerService.get().getApplicationInfo(packageName, 0, userId);
  if (ps == null || info == null) {
    return null;
  }
  if (!ps.isLaunched(userId)) {
    sendFirstLaunchBroadcast(ps, userId);
    ps.setLaunched(userId, true);
    VAppManagerService.get().savePersistenceData();
  }
  int uid = VUserHandle.getUid(userId, ps.appId);
  ProcessRecord app = mProcessNames.get(processName, uid);
  if (app != null && app.client.asBinder().isBinderAlive()) {
    return app;
  }
  int vpid = queryFreeStubProcessLocked();
  if (vpid == -1) {
    return null;
  }
  app = performStartProcessLocked(uid, vpid, info, processName);
  if (app != null) {
    app.pkgList.add(info.packageName);
  }
  return app;
}
origin: darkskygit/VirtualApp

public void refreshAuthenticatorCache(String packageName) {
  cache.authenticators.clear();
  Intent intent = new Intent(AccountManager.ACTION_AUTHENTICATOR_INTENT);
  if (packageName != null) {
    intent.setPackage(packageName);
  }
  generateServicesMap(
      VPackageManagerService.get().queryIntentServices(intent, null, PackageManager.GET_META_DATA, 0),
      cache.authenticators, new RegisteredServicesParser());
}
origin: bzsome/VirtualApp-x326

public void refreshAuthenticatorCache(String packageName) {
  cache.authenticators.clear();
  Intent intent = new Intent(AccountManager.ACTION_AUTHENTICATOR_INTENT);
  if (packageName != null) {
    intent.setPackage(packageName);
  }
  generateServicesMap(
      VPackageManagerService.get().queryIntentServices(intent, null, PackageManager.GET_META_DATA, 0),
      cache.authenticators, new RegisteredServicesParser());
}
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

  public static VPackage remove(String packageName) {
    synchronized (PackageCacheManager.class) {
      VPackageManagerService.get().deletePackageLocked(packageName);
      return PACKAGE_CACHE.remove(packageName);
    }
  }
}
origin: bzsome/VirtualApp-x326

  public static VPackage remove(String packageName) {
    synchronized (PackageCacheManager.class) {
      VPackageManagerService.get().deletePackageLocked(packageName);
      return PACKAGE_CACHE.remove(packageName);
    }
  }
}
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

public static void put(VPackage pkg, PackageSetting ps) {
  synchronized (PackageCacheManager.class) {
    PackageParserEx.initApplicationInfoBase(ps, pkg);
    PACKAGE_CACHE.put(pkg.packageName, pkg);
    pkg.mExtras = ps;
    VPackageManagerService.get().analyzePackageLocked(pkg);
  }
}
origin: darkskygit/VirtualApp

public static void put(VPackage pkg, PackageSetting ps) {
  synchronized (PackageCacheManager.class) {
    PackageParserEx.initApplicationInfoBase(ps, pkg);
    PACKAGE_CACHE.put(pkg.packageName, pkg);
    pkg.mExtras = ps;
    VPackageManagerService.get().analyzePackageLocked(pkg);
  }
}
origin: darkskygit/VirtualApp

@Override
public boolean onCreate() {
  Context context = getContext();
  DaemonService.startup(context);
  if (!VirtualCore.get().isStartup()) {
    return true;
  }
  VPackageManagerService.systemReady();
  addService(ServiceManagerNative.PACKAGE, VPackageManagerService.get());
  VActivityManagerService.systemReady(context);
  addService(ServiceManagerNative.ACTIVITY, VActivityManagerService.get());
  addService(ServiceManagerNative.USER, VUserManagerService.get());
  VAppManagerService.systemReady();
  addService(ServiceManagerNative.APP, VAppManagerService.get());
  BroadcastSystem.attach(VActivityManagerService.get(), VAppManagerService.get());
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    addService(ServiceManagerNative.JOB, VJobSchedulerService.get());
  }
  VNotificationManagerService.systemReady(context);
  addService(ServiceManagerNative.NOTIFICATION, VNotificationManagerService.get());
  VAppManagerService.get().scanApps();
  VAccountManagerService.systemReady();
  addService(ServiceManagerNative.ACCOUNT, VAccountManagerService.get());
  addService(ServiceManagerNative.VS, VirtualStorageService.get());
  addService(ServiceManagerNative.DEVICE, VDeviceManagerService.get());
  addService(ServiceManagerNative.VIRTUAL_LOC, VirtualLocationService.get());
  return true;
}
com.lody.virtual.server.pmVPackageManagerServiceget

Popular methods of VPackageManagerService

  • <init>
  • analyzePackageLocked
  • checkUserId
  • chooseBestActivity
  • cleanUpUser
  • createNewUser
  • deletePackageLocked
  • findPreferredActivity
  • generatePackageInfo
  • getActivityInfo
  • getApplicationInfo
  • getProviderInfo
  • getApplicationInfo,
  • getProviderInfo,
  • getReceiverInfo,
  • getServiceInfo,
  • queryIntentActivities,
  • queryIntentServices,
  • systemReady,
  • updateFlagsNought,
  • getNameForUid

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Permission (java.security)
    Legacy security code; do not use.
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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