public boolean isPackageLaunchable(String packageName) { InstalledAppInfo info = getInstalledAppInfo(packageName, 0); return info != null && getLaunchIntent(packageName, info.getInstalledUsers()[0]) != null; }
public Resources getResources(String pkg) throws Resources.NotFoundException { InstalledAppInfo installedAppInfo = getInstalledAppInfo(pkg, 0); if (installedAppInfo != null) { AssetManager assets = mirror.android.content.res.AssetManager.ctor.newInstance(); mirror.android.content.res.AssetManager.addAssetPath.call(assets, installedAppInfo.apkPath); Resources hostRes = context.getResources(); return new Resources(assets, hostRes.getDisplayMetrics(), hostRes.getConfiguration()); } throw new Resources.NotFoundException(pkg); }
public boolean removeShortcut(int userId, String packageName, Intent splash, OnEmitShortcutListener listener) { InstalledAppInfo setting = getInstalledAppInfo(packageName, 0); if (setting == null) { return false;
public boolean createShortcut(int userId, String packageName, Intent splash, OnEmitShortcutListener listener) { InstalledAppInfo setting = getInstalledAppInfo(packageName, 0); if (setting == null) { return false;
ActivityInfo info = saveInstance.info; if (VClientImpl.get().getToken() == null) { InstalledAppInfo installedAppInfo = VirtualCore.get().getInstalledAppInfo(info.packageName, 0); if (installedAppInfo == null) { Log.i(TAG, "install app info is null, return");
); AppBindData data = new AppBindData(); InstalledAppInfo info = VirtualCore.get().getInstalledAppInfo(packageName, 0); if (info == null) { new Exception("App not exist!").printStackTrace();
ActivityInfo info = saveInstance.info; if (VClientImpl.get().getToken() == null) { InstalledAppInfo installedAppInfo = VirtualCore.get().getInstalledAppInfo(info.packageName, 0); if(installedAppInfo == null){ return true;
public boolean isPackageLaunchable(String packageName) { InstalledAppInfo info = getInstalledAppInfo(packageName, 0); return info != null && getLaunchIntent(packageName, info.getInstalledUsers()[0]) != null; }
public boolean isPackageLaunchable(String packageName) { InstalledAppInfo info = getInstalledAppInfo(packageName, 0); return info != null && getLaunchIntent(packageName, info.getInstalledUsers()[0]) != null; }
public Resources getResources(String pkg) throws Resources.NotFoundException { InstalledAppInfo installedAppInfo = getInstalledAppInfo(pkg, 0); if (installedAppInfo != null) { AssetManager assets = mirror.android.content.res.AssetManager.ctor.newInstance(); mirror.android.content.res.AssetManager.addAssetPath.call(assets, installedAppInfo.apkPath); Resources hostRes = context.getResources(); return new Resources(assets, hostRes.getDisplayMetrics(), hostRes.getConfiguration()); } throw new Resources.NotFoundException(pkg); }
/** * Optimize the Dalvik-Cache for the specified package. * * @param pkg package name * @throws IOException */ @Deprecated public void preOpt(String pkg) throws IOException { InstalledAppInfo info = getInstalledAppInfo(pkg, 0); if (info != null && !info.dependSystem) { DexFile.loadDex(info.apkPath, info.getOdexFile().getPath(), 0).close(); } }
private PackageAppData loadAppData(String packageName) { InstalledAppInfo setting = VirtualCore.get().getInstalledAppInfo(packageName, 0); if (setting != null) { PackageAppData data = new PackageAppData(VApp.getApp(), setting); synchronized (packageDataMap) { packageDataMap.put(packageName, data); } return data; } return null; }
public Resources getResources(String pkg) throws Resources.NotFoundException { InstalledAppInfo installedAppInfo = getInstalledAppInfo(pkg, 0); if (installedAppInfo != null) { AssetManager assets = mirror.android.content.res.AssetManager.ctor.newInstance(); mirror.android.content.res.AssetManager.addAssetPath.call(assets, installedAppInfo.apkPath); Resources hostRes = context.getResources(); return new Resources(assets, hostRes.getDisplayMetrics(), hostRes.getConfiguration()); } throw new Resources.NotFoundException(pkg); }
private PackageAppData loadAppData(String packageName) { InstalledAppInfo setting = VirtualCore.get().getInstalledAppInfo(packageName, 0); if (setting != null) { PackageAppData data = new PackageAppData(VApp.getApp(), setting); synchronized (packageDataMap) { packageDataMap.put(packageName, data); } return data; } return null; }
public MultiplePackageAppData(PackageAppData target, int userId) { this.userId = userId; this.appInfo = VirtualCore.get().getInstalledAppInfo(target.packageName, 0); this.isFirstOpen = !appInfo.isLaunched(userId); if (target.icon != null) { Drawable.ConstantState state = target.icon.getConstantState(); if (state != null) { icon = state.newDrawable(); } } name = target.name; }
public MultiplePackageAppData(PackageAppData target, int userId) { this.userId = userId; this.appInfo = VirtualCore.get().getInstalledAppInfo(target.packageName, 0); this.isFirstOpen = !appInfo.isLaunched(userId); if (target.icon != null) { Drawable.ConstantState state = target.icon.getConstantState(); if (state != null) { icon = state.newDrawable(); } } name = target.name; }
info.name = ai.loadLabel(pm); info.version = pkg.versionName; InstalledAppInfo installedAppInfo = VirtualCore.get().getInstalledAppInfo(pkg.packageName, 0); if (installedAppInfo != null) { info.cloneCount = installedAppInfo.getInstalledUsers().length;
info.icon = ai.loadIcon(pm); info.name = ai.loadLabel(pm); InstalledAppInfo installedAppInfo = VirtualCore.get().getInstalledAppInfo(pkg.packageName, 0); if (installedAppInfo != null) { info.cloneCount = installedAppInfo.getInstalledUsers().length;
ActivityInfo info = saveInstance.info; if (VClientImpl.get().getToken() == null) { InstalledAppInfo installedAppInfo = VirtualCore.get().getInstalledAppInfo(info.packageName, 0); if(installedAppInfo == null){ return true;
ActivityInfo info = saveInstance.info; if (VClientImpl.get().getToken() == null) { InstalledAppInfo installedAppInfo = VirtualCore.get().getInstalledAppInfo(info.packageName, 0); if(installedAppInfo == null){ return true;