Codota Logo
VAppManagerService.getPackageInstalledUsers
Code IndexAdd Codota to your IDE (free)

How to use
getPackageInstalledUsers
method
in
com.lody.virtual.server.pm.VAppManagerService

Best Java code snippets using com.lody.virtual.server.pm.VAppManagerService.getPackageInstalledUsers (Showing top 5 results out of 315)

  • Common ways to obtain VAppManagerService
private void myMethod () {
VAppManagerService v =
  • Codota Iconnew VAppManagerService()
  • Codota IconAtomicReference atomicReference;atomicReference.get()
  • Smart code suggestions by Codota
}
origin: android-hacker/VirtualXposed

@Override
public boolean clearPackageAsUser(int userId, String packageName) throws RemoteException {
  if (!VUserManagerService.get().exists(userId)) {
    return false;
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  if (ps != null) {
    int[] userIds = getPackageInstalledUsers(packageName);
    if (!ArrayUtils.contains(userIds, userId)) {
      return false;
    }
    if (userIds.length == 1) {
      clearPackage(packageName);
    } else {
      // Just hidden it
      VActivityManagerService.get().killAppByPkg(packageName, userId);
      ps.setInstalled(userId, false);
      mPersistenceLayer.save();
      FileUtils.deleteDir(VEnvironment.getDataUserPackageDirectory(userId, packageName));
      FileUtils.deleteDir(VEnvironment.getVirtualPrivateStorageDir(userId, packageName));
    }
    return true;
  }
  return false;
}
origin: android-hacker/VirtualXposed

@Override
public synchronized boolean uninstallPackageAsUser(String packageName, int userId) {
  if (!VUserManagerService.get().exists(userId)) {
    return false;
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  if (ps != null) {
    int[] userIds = getPackageInstalledUsers(packageName);
    if (!ArrayUtils.contains(userIds, userId)) {
      return false;
    }
    if (userIds.length == 1) {
      uninstallPackageFully(ps);
    } else {
      // Just hidden it
      VActivityManagerService.get().killAppByPkg(packageName, userId);
      ps.setInstalled(userId, false);
      notifyAppUninstalled(ps, userId);
      mPersistenceLayer.save();
      FileUtils.deleteDir(VEnvironment.getDataUserPackageDirectory(userId, packageName));
      FileUtils.deleteDir(VEnvironment.getVirtualPrivateStorageDir(userId, packageName));
    }
    return true;
  }
  return false;
}
origin: bzsome/VirtualApp-x326

@Override
public synchronized boolean uninstallPackageAsUser(String packageName, int userId) {
  if (!VUserManagerService.get().exists(userId)) {
    return false;
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  if (ps != null) {
    int[] userIds = getPackageInstalledUsers(packageName);
    if (!ArrayUtils.contains(userIds, userId)) {
      return false;
    }
    if (userIds.length == 1) {
      uninstallPackageFully(ps);
    } else {
      // Just hidden it
      VActivityManagerService.get().killAppByPkg(packageName, userId);
      ps.setInstalled(userId, false);
      notifyAppUninstalled(ps, userId);
      mPersistenceLayer.save();
      FileUtils.deleteDir(VEnvironment.getDataUserPackageDirectory(userId, packageName));
    }
    return true;
  }
  return false;
}
origin: darkskygit/VirtualApp

@Override
public boolean clearPackageAsUser(int userId, String packageName) throws RemoteException {
  if (!VUserManagerService.get().exists(userId)) {
    return false;
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  if (ps != null) {
    int[] userIds = getPackageInstalledUsers(packageName);
    if (!ArrayUtils.contains(userIds, userId)) {
      return false;
    }
    if (userIds.length == 1) {
      clearPackage(packageName);
    } else {
      // Just hidden it
      VActivityManagerService.get().killAppByPkg(packageName, userId);
      ps.setInstalled(userId, false);
      mPersistenceLayer.save();
      FileUtils.deleteDir(VEnvironment.getDataUserPackageDirectory(userId, packageName));
      FileUtils.deleteDir(VEnvironment.getVirtualPrivateStorageDir(userId, packageName));
    }
    return true;
  }
  return false;
}
origin: darkskygit/VirtualApp

@Override
public synchronized boolean uninstallPackageAsUser(String packageName, int userId) {
  if (!VUserManagerService.get().exists(userId)) {
    return false;
  }
  PackageSetting ps = PackageCacheManager.getSetting(packageName);
  if (ps != null) {
    int[] userIds = getPackageInstalledUsers(packageName);
    if (!ArrayUtils.contains(userIds, userId)) {
      return false;
    }
    if (userIds.length == 1) {
      uninstallPackageFully(ps);
    } else {
      // Just hidden it
      VActivityManagerService.get().killAppByPkg(packageName, userId);
      ps.setInstalled(userId, false);
      notifyAppUninstalled(ps, userId);
      mPersistenceLayer.save();
      FileUtils.deleteDir(VEnvironment.getDataUserPackageDirectory(userId, packageName));
      FileUtils.deleteDir(VEnvironment.getVirtualPrivateStorageDir(userId, packageName));
    }
    return true;
  }
  return false;
}
com.lody.virtual.server.pmVAppManagerServicegetPackageInstalledUsers

Popular methods of VAppManagerService

  • <init>
  • canUpdate
  • chmodPackageDictionary
  • cleanUpResidualFiles
  • get
  • getAppId
  • getInstalledAppCount
  • installPackage
  • isAppInstalled
  • isBooting
  • loadPackage
  • loadPackageInnerLocked
  • loadPackage,
  • loadPackageInnerLocked,
  • notifyAppInstalled,
  • notifyAppUninstalled,
  • restoreFactoryState,
  • savePersistenceData,
  • scanApps,
  • sendInstalledBroadcast,
  • sendUninstalledBroadcast

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now