本文整理汇总了Java中mirror.android.content.pm.PackageInstaller类的典型用法代码示例。如果您正苦于以下问题:Java PackageInstaller类的具体用法?Java PackageInstaller怎么用?Java PackageInstaller使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PackageInstaller类属于mirror.android.content.pm包,在下文中一共展示了PackageInstaller类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: alloc
import mirror.android.content.pm.PackageInstaller; //导入依赖的package包/类
public android.content.pm.PackageInstaller.SessionInfo alloc() {
android.content.pm.PackageInstaller.SessionInfo sessionInfo = PackageInstaller.SessionInfo.ctor.newInstance();
PackageInstaller.SessionInfo.sessionId.set(sessionInfo, sessionId);
PackageInstaller.SessionInfo.installerPackageName.set(sessionInfo, installerPackageName);
PackageInstaller.SessionInfo.resolvedBaseCodePath.set(sessionInfo, resolvedBaseCodePath);
PackageInstaller.SessionInfo.progress.set(sessionInfo, progress);
PackageInstaller.SessionInfo.sealed.set(sessionInfo, sealed);
PackageInstaller.SessionInfo.active.set(sessionInfo, active);
PackageInstaller.SessionInfo.mode.set(sessionInfo, mode);
PackageInstaller.SessionInfo.sizeBytes.set(sessionInfo, sizeBytes);
PackageInstaller.SessionInfo.appPackageName.set(sessionInfo, appPackageName);
PackageInstaller.SessionInfo.appIcon.set(sessionInfo, appIcon);
PackageInstaller.SessionInfo.appLabel.set(sessionInfo, appLabel);
return sessionInfo;
}
示例2: realloc
import mirror.android.content.pm.PackageInstaller; //导入依赖的package包/类
public static SessionInfo realloc(android.content.pm.PackageInstaller.SessionInfo sessionInfo) {
SessionInfo info = new SessionInfo();
info.sessionId = PackageInstaller.SessionInfo.sessionId.get(sessionInfo);
info.installerPackageName = PackageInstaller.SessionInfo.installerPackageName.get(sessionInfo);
info.resolvedBaseCodePath = PackageInstaller.SessionInfo.resolvedBaseCodePath.get(sessionInfo);
info.progress = PackageInstaller.SessionInfo.progress.get(sessionInfo);
info.sealed = PackageInstaller.SessionInfo.sealed.get(sessionInfo);
info.active = PackageInstaller.SessionInfo.active.get(sessionInfo);
info.mode = PackageInstaller.SessionInfo.mode.get(sessionInfo);
info.sizeBytes = PackageInstaller.SessionInfo.sizeBytes.get(sessionInfo);
info.appPackageName = PackageInstaller.SessionInfo.appPackageName.get(sessionInfo);
info.appIcon = PackageInstaller.SessionInfo.appIcon.get(sessionInfo);
info.appLabel = PackageInstaller.SessionInfo.appLabel.get(sessionInfo);
return info;
}