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

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

Best Java code snippets using com.lody.virtual.server.pm.VAppManagerService.get (Showing top 18 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

private boolean isAccountExist(int userId, Account account, String providerName) {
  synchronized (mAppSyncAdapterInfos) {
    SyncAdapterInfo info = mAppSyncAdapterInfos.get(account.type + "/" + providerName);
    return info != null
        && VAppManagerService.get().isAppInstalled(info.serviceInfo.packageName);
  }
}
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

  @Override
  public void onPersistenceFileDamage() {
    getPersistenceFile().delete();
    VAppManagerService.get().restoreFactoryState();
  }
}
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

@Override
public void uninstall(String packageName, String callerPackageName, int flags, IntentSender statusReceiver, int userId) throws RemoteException {
  boolean success = VAppManagerService.get().uninstallPackage(packageName);
  if (statusReceiver != null) {
    final Intent fillIn = new Intent();
    fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, packageName);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS, success ? PackageInstaller.STATUS_SUCCESS : PackageInstaller.STATUS_FAILURE);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS_MESSAGE, PackageHelper.deleteStatusToString(success));
    fillIn.putExtra("android.content.pm.extra.LEGACY_STATUS", success ? 1 : -1);
    try {
      statusReceiver.sendIntent(mContext, 0, fillIn, null, null);
    } catch (IntentSender.SendIntentException e) {
      e.printStackTrace();
    }
  }
}
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

@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: 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: bzsome/VirtualApp-x326

private boolean isAccountExist(int userId, Account account, String providerName) {
  synchronized (mAppSyncAdapterInfos) {
    SyncAdapterInfo info = mAppSyncAdapterInfos.get(account.type + "/" + providerName);
    return info != null
        && VAppManagerService.get().isAppInstalled(info.serviceInfo.packageName);
  }
}
origin: darkskygit/VirtualApp

private boolean isAccountExist(int userId, Account account, String providerName) {
  synchronized (mAppSyncAdapterInfos) {
    SyncAdapterInfo info = mAppSyncAdapterInfos.get(account.type + "/" + providerName);
    return info != null
        && VAppManagerService.get().isAppInstalled(info.serviceInfo.packageName);
  }
}
origin: darkskygit/VirtualApp

  @Override
  public void onPersistenceFileDamage() {
    getPersistenceFile().delete();
    VAppManagerService.get().restoreFactoryState();
  }
}
origin: bzsome/VirtualApp-x326

  @Override
  public void onPersistenceFileDamage() {
    getPersistenceFile().delete();
    VAppManagerService.get().restoreFactoryState();
  }
}
origin: darkskygit/VirtualApp

@Override
public void uninstall(String packageName, String callerPackageName, int flags, IntentSender statusReceiver, int userId) throws RemoteException {
  boolean success = VAppManagerService.get().uninstallPackage(packageName);
  if (statusReceiver != null) {
    final Intent fillIn = new Intent();
    fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, packageName);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS, success ? PackageInstaller.STATUS_SUCCESS : PackageInstaller.STATUS_FAILURE);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS_MESSAGE, PackageHelper.deleteStatusToString(success));
    fillIn.putExtra("android.content.pm.extra.LEGACY_STATUS", success ? 1 : -1);
    try {
      statusReceiver.sendIntent(mContext, 0, fillIn, null, null);
    } catch (IntentSender.SendIntentException e) {
      e.printStackTrace();
    }
  }
}
origin: bzsome/VirtualApp-x326

@Override
public void uninstall(String packageName, String callerPackageName, int flags, IntentSender statusReceiver, int userId) throws RemoteException {
  boolean success = VAppManagerService.get().uninstallPackage(packageName);
  if (statusReceiver != null) {
    final Intent fillIn = new Intent();
    fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, packageName);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS, success ? PackageInstaller.STATUS_SUCCESS : PackageInstaller.STATUS_FAILURE);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS_MESSAGE, PackageHelper.deleteStatusToString(success));
    fillIn.putExtra("android.content.pm.extra.LEGACY_STATUS", success ? 1 : -1);
    try {
      statusReceiver.sendIntent(mContext, 0, fillIn, null, null);
    } catch (IntentSender.SendIntentException e) {
      e.printStackTrace();
    }
  }
}
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;
}
origin: bzsome/VirtualApp-x326

@Override
public boolean onCreate() {
  Context context = getContext();
  DaemonService.startup(context);
  if (!VirtualCore.get().isStartup()) {
    return true;
  }
  VPackageManagerService.systemReady();
  IPCBus.register(IPackageManager.class, VPackageManagerService.get());
  VActivityManagerService.systemReady(context);
  IPCBus.register(IActivityManager.class, VActivityManagerService.get());
  IPCBus.register(IUserManager.class, VUserManagerService.get());
  VAppManagerService.systemReady();
  IPCBus.register(IAppManager.class, VAppManagerService.get());
  BroadcastSystem.attach(VActivityManagerService.get(), VAppManagerService.get());
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    IPCBus.register(IJobScheduler.class, VJobSchedulerService.get());
  }
  VNotificationManagerService.systemReady(context);
  IPCBus.register(INotificationManager.class, VNotificationManagerService.get());
  VAppManagerService.get().scanApps();
  VAccountManagerService.systemReady();
  IPCBus.register(IAccountManager.class, VAccountManagerService.get());
  IPCBus.register(IVirtualStorageService.class, VirtualStorageService.get());
  IPCBus.register(IDeviceInfoManager.class, VDeviceManagerService.get());
  IPCBus.register(IVirtualLocationManager.class, VirtualLocationService.get());
  return true;
}
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: 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;
}
com.lody.virtual.server.pmVAppManagerServiceget

Popular methods of VAppManagerService

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • JComboBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Runner (org.openjdk.jmh.runner)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
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