Lines Matching refs:applicationInfo
100 import android.content.pm.ApplicationInfo;
482 ApplicationInfo mAndroidApplication;
1036 res.pkg.applicationInfo.packageName,
1043 res.pkg.applicationInfo.packageName,
1047 res.pkg.applicationInfo.packageName,
1051 res.pkg.applicationInfo.packageName, null, updateUsers);
1059 int[] uidArray = new int[] { res.pkg.applicationInfo.uid };
1061 pkgList.add(res.pkg.applicationInfo.packageName);
1303 ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PRIVILEGED);
1305 ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PRIVILEGED);
1307 ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PRIVILEGED);
1309 ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PRIVILEGED);
1311 ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PRIVILEGED);
1313 ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PRIVILEGED);
1591 if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0) {
1675 deletedPkg.applicationInfo.flags &= ~ApplicationInfo.FLAG_SYSTEM;
1678 deletedPs.pkgFlags &= ~ApplicationInfo.FLAG_SYSTEM;
1996 return UserHandle.getUid(userId, p.applicationInfo.uid);
1999 if((ps == null) || (ps.pkg == null) || (ps.pkg.applicationInfo == null)) {
2003 return p != null ? UserHandle.getUid(userId, p.applicationInfo.uid) : -1;
2095 private ApplicationInfo generateApplicationInfoFromSettingsLPw(String packageName, int flags,
2104 return pInfo.applicationInfo;
2126 pkg.applicationInfo.packageName = packageName;
2127 pkg.applicationInfo.flags = ps.pkgFlags | ApplicationInfo.FLAG_IS_DATA_ONLY;
2128 pkg.applicationInfo.dataDir =
2130 pkg.applicationInfo.primaryCpuAbi = ps.primaryCpuAbiString;
2131 pkg.applicationInfo.secondaryCpuAbi = ps.secondaryCpuAbiString;
2139 public ApplicationInfo getApplicationInfo(String packageName, int flags, int userId) {
2679 if (pkg.applicationInfo.uid != Binder.getCallingUid()) {
3100 ri.activityInfo.applicationInfo = new ApplicationInfo(
3101 ri.activityInfo.applicationInfo);
3102 ri.activityInfo.applicationInfo.uid = UserHandle.getUid(userId,
3103 UserHandle.getAppId(ri.activityInfo.applicationInfo.uid));
3150 if (!ri.activityInfo.applicationInfo.packageName
3151 .equals(ai.applicationInfo.packageName)) {
3264 if (!ri.activityInfo.applicationInfo.packageName
3265 .equals(ai.applicationInfo.packageName)) {
3555 comp = new ComponentName(ai.applicationInfo.packageName,
3572 && sri.activityInfo.applicationInfo.packageName.equals(
3645 if (caller.getPackageName().equals(ainfo.applicationInfo.packageName)
3899 public ParceledListSlice<ApplicationInfo> getInstalledApplications(int flags, int userId) {
3905 ArrayList<ApplicationInfo> list;
3907 list = new ArrayList<ApplicationInfo>(mSettings.mPackages.size());
3909 ApplicationInfo ai;
3921 list = new ArrayList<ApplicationInfo>(mPackages.size());
3924 ApplicationInfo ai = PackageParser.generateApplicationInfo(p, flags,
3933 return new ParceledListSlice<ApplicationInfo>(list);
3937 public List<ApplicationInfo> getPersistentApplications(int flags) {
3938 final ArrayList<ApplicationInfo> finalList = new ArrayList<ApplicationInfo>();
3946 if (p.applicationInfo != null
3947 && (p.applicationInfo.flags&ApplicationInfo.FLAG_PERSISTENT) != 0
3951 ApplicationInfo ai = PackageParser.generateApplicationInfo(p, flags,
3975 && (!mSafeMode || (provider.info.applicationInfo.flags
3976 &ApplicationInfo.FLAG_SYSTEM) != 0)
3999 && (!mSafeMode || (p.info.applicationInfo.flags
4000 &ApplicationInfo.FLAG_SYSTEM) != 0)) {
4027 && UserHandle.isSameApp(p.info.applicationInfo.uid, uid)))
4030 || (p.info.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0)) {
4113 final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
4129 pkg.applicationInfo.resourceDirs = new String[overlayArray.length];
4132 pkg.applicationInfo.resourceDirs[i++] = p.baseCodePath;
4292 updatedPkg.pkgFlags |= ApplicationInfo.FLAG_PRIVILEGED;
4294 updatedPkg.pkgFlags &= ~ApplicationInfo.FLAG_PRIVILEGED;
4356 if ((updatedPkg.pkgFlags & ApplicationInfo.FLAG_PRIVILEGED) != 0) {
4439 pkg.applicationInfo.setCodePath(pkg.codePath);
4440 pkg.applicationInfo.setBaseCodePath(pkg.baseCodePath);
4441 pkg.applicationInfo.setSplitCodePaths(pkg.splitCodePaths);
4442 pkg.applicationInfo.setResourcePath(resourcePath);
4443 pkg.applicationInfo.setBaseResourcePath(baseResourcePath);
4444 pkg.applicationInfo.setSplitResourcePaths(pkg.splitCodePaths);
4748 private static String getPrimaryInstructionSet(ApplicationInfo info) {
4780 getPrimaryInstructionSet(p.applicationInfo);
4844 targetInstructionSets : getAppDexInstructionSets(pkg.applicationInfo);
4856 if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_HAS_CODE) == 0) {
4860 final boolean vmSafeMode = (pkg.applicationInfo.flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
4885 + pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet
4887 final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
4900 Log.i(TAG, "Running patchoat on: " + pkg.applicationInfo.packageName);
4901 final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
4955 private static String[] getAppDexInstructionSets(ApplicationInfo info) {
5050 getPrimaryInstructionSet(pkg.applicationInfo) };
5071 if ((oldPkg.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0) {
5281 if (pkg.applicationInfo.getCodePath() == null ||
5282 pkg.applicationInfo.getResourcePath() == null) {
5289 pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SYSTEM;
5296 pkg.applicationInfo.flags |= ApplicationInfo.FLAG_PRIVILEGED;
5318 mAndroidApplication = pkg.applicationInfo;
5321 mResolveActivity.applicationInfo = mAndroidApplication;
5365 if (!pkg.applicationInfo.getCodePath().equals(known.codePathString)
5366 || !pkg.applicationInfo.getResourcePath().equals(known.resourcePathString)) {
5369 + " found at " + pkg.applicationInfo.getCodePath()
5376 File destCodeFile = new File(pkg.applicationInfo.getCodePath());
5377 File destResourceFile = new File(pkg.applicationInfo.getResourcePath());
5463 destResourceFile, pkg.applicationInfo.nativeLibraryRootDir,
5464 pkg.applicationInfo.primaryCpuAbi,
5465 pkg.applicationInfo.secondaryCpuAbi,
5466 pkg.applicationInfo.flags, user, false);
5497 pkg.applicationInfo.flags |= ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
5513 pkg.applicationInfo.uid = pkgSetting.appId;
5578 + " (in package " + pkg.applicationInfo.packageName
5607 pkg.applicationInfo.processName = fixProcessName(
5608 pkg.applicationInfo.packageName,
5609 pkg.applicationInfo.processName,
5610 pkg.applicationInfo.uid);
5617 pkg.applicationInfo.dataDir = dataPath.getPath();
5634 if (currentUid != pkg.applicationInfo.uid) {
5641 int ret = mInstaller.fixUid(pkgName, pkg.applicationInfo.uid,
5642 pkg.applicationInfo.uid);
5647 + pkg.applicationInfo.uid;
5664 + pkg.applicationInfo.uid + "; old data erased";
5669 ret = createDataDirsLI(pkgName, pkg.applicationInfo.uid,
5670 pkg.applicationInfo.seinfo);
5690 pkg.applicationInfo.dataDir = "/mismatched_uid/settings_"
5691 + pkg.applicationInfo.uid + "/fs_"
5693 pkg.applicationInfo.nativeLibraryDir = pkg.applicationInfo.dataDir;
5694 pkg.applicationInfo.nativeLibraryRootDir = pkg.applicationInfo.dataDir;
5698 + pkg.applicationInfo.uid + " in settings";
5710 pkg.applicationInfo.dataDir = dataPath.getPath();
5713 mInstaller.restoreconData(pkg.packageName, pkg.applicationInfo.seinfo,
5714 pkg.applicationInfo.uid);
5722 int ret = createDataDirsLI(pkgName, pkg.applicationInfo.uid,
5723 pkg.applicationInfo.seinfo);
5731 pkg.applicationInfo.dataDir = dataPath.getPath();
5734 pkg.applicationInfo.dataDir = null;
5742 final String codePath = pkg.applicationInfo.getCodePath();
5750 if (pkg.applicationInfo.primaryCpuAbi == null
5751 && pkg.applicationInfo.secondaryCpuAbi == null
5757 pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
5778 final String nativeLibraryRootStr = pkg.applicationInfo.nativeLibraryRootDir;
5779 final boolean useIsaSpecificSubdirs = pkg.applicationInfo.nativeLibraryRootRequiresIsa;
5793 pkg.applicationInfo.primaryCpuAbi = null;
5794 pkg.applicationInfo.secondaryCpuAbi = null;
5795 if (isMultiArch(pkg.applicationInfo)) {
5833 pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_64_BIT_ABIS[abi64];
5839 pkg.applicationInfo.secondaryCpuAbi = abi;
5841 pkg.applicationInfo.primaryCpuAbi = abi;
5873 pkg.applicationInfo.primaryCpuAbi = abiList[copyRet];
5875 pkg.applicationInfo.primaryCpuAbi = cpuAbiOverride;
5877 pkg.applicationInfo.primaryCpuAbi = abiList[0];
5896 if (pkg.applicationInfo.primaryCpuAbi != null &&
5897 !VMRuntime.is64BitAbi(pkg.applicationInfo.primaryCpuAbi)) {
5898 final String nativeLibPath = pkg.applicationInfo.nativeLibraryDir;
5914 pkg.applicationInfo.primaryCpuAbi = VMRuntime.getRuntime().is64Bit() ?
5918 pkgSetting.primaryCpuAbiString = pkg.applicationInfo.primaryCpuAbi;
5919 pkgSetting.secondaryCpuAbiString = pkg.applicationInfo.secondaryCpuAbi;
5926 Slog.d(TAG, "Resolved nativeLibraryRoot for " + pkg.applicationInfo.packageName
5927 + " to root=" + pkg.applicationInfo.nativeLibraryRootDir + ", isa="
5928 + pkg.applicationInfo.nativeLibraryRootRequiresIsa);
5933 pkgSetting.legacyNativeLibraryPathString = pkg.applicationInfo.nativeLibraryRootDir;
5937 " primary=" + pkg.applicationInfo.primaryCpuAbi +
5938 " secondary=" + pkg.applicationInfo.secondaryCpuAbi);
5961 pkg.applicationInfo.flags |= ApplicationInfo.FLAG_FACTORY_TEST;
5968 if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0) {
6041 killApplication(pkg.applicationInfo.packageName,
6042 pkg.applicationInfo.uid, "update pkg");
6049 killApplication(clientPkg.applicationInfo.packageName,
6050 clientPkg.applicationInfo.uid, "update lib");
6061 mPackages.put(pkg.applicationInfo.packageName, pkg);
6120 p.info.processName = fixProcessName(pkg.applicationInfo.processName,
6121 p.info.processName, pkg.applicationInfo.uid);
6155 applicationInfo.packageName +
6179 s.info.processName = fixProcessName(pkg.applicationInfo.processName,
6180 s.info.processName, pkg.applicationInfo.uid);
6199 a.info.processName = fixProcessName(pkg.applicationInfo.processName,
6200 a.info.processName, pkg.applicationInfo.uid);
6219 a.info.processName = fixProcessName(pkg.applicationInfo.processName,
6220 a.info.processName, pkg.applicationInfo.uid);
6289 bp.uid = pkg.applicationInfo.uid;
6314 bp.uid = pkg.applicationInfo.uid;
6361 a.info.packageName = pkg.applicationInfo.packageName;
6362 a.info.sourceDir = pkg.applicationInfo.sourceDir;
6363 a.info.publicSourceDir = pkg.applicationInfo.publicSourceDir;
6364 a.info.splitSourceDirs = pkg.applicationInfo.splitSourceDirs;
6365 a.info.splitPublicSourceDirs = pkg.applicationInfo.splitPublicSourceDirs;
6366 a.info.dataDir = pkg.applicationInfo.dataDir;
6370 a.info.nativeLibraryDir = pkg.applicationInfo.nativeLibraryDir;
6437 if (scannedPackage != null && scannedPackage.applicationInfo.primaryCpuAbi != null) {
6439 scannedPackage.applicationInfo.primaryCpuAbi);
6479 scannedPackage.applicationInfo.primaryCpuAbi = adjustedAbi;
6484 adjustedAbi = scannedPackage.applicationInfo.primaryCpuAbi;
6494 if (ps.pkg != null && ps.pkg.applicationInfo != null) {
6495 ps.pkg.applicationInfo.primaryCpuAbi = adjustedAbi;
6501 ps.pkg.applicationInfo.primaryCpuAbi = null;
6517 mResolveActivity.applicationInfo = pkg.applicationInfo;
6519 mResolveActivity.packageName = pkg.applicationInfo.packageName;
6520 mResolveActivity.processName = pkg.applicationInfo.packageName;
6574 final ApplicationInfo info = pkg.applicationInfo;
6642 final String apkName = deriveCodePathName(pkg.applicationInfo.getCodePath());
6646 final String apkRoot = calculateBundledApkRoot(pkg.applicationInfo.sourceDir);
6655 pkgSetting.primaryCpuAbiString = pkg.applicationInfo.primaryCpuAbi;
6656 pkgSetting.secondaryCpuAbiString = pkg.applicationInfo.secondaryCpuAbi;
6701 pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0];
6702 pkg.applicationInfo.secondaryCpuAbi = null;
6707 pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
6708 pkg.applicationInfo.secondaryCpuAbi = null;
6717 if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_MULTIARCH) == 0) {
6722 pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0];
6723 pkg.applicationInfo.secondaryCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
6725 pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
6726 pkg.applicationInfo.secondaryCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0];
6729 pkg.applicationInfo.primaryCpuAbi = null;
6730 pkg.applicationInfo.secondaryCpuAbi = null;
6766 Log.d(TAG, "Removing package " + pkg.applicationInfo.packageName);
6771 mPackages.remove(pkg.applicationInfo.packageName);
6938 if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0) {
7173 + " flags=0x" + Integer.toHexString(pkg.applicationInfo.flags)
7182 + " flags=0x" + Integer.toHexString(pkg.applicationInfo.flags)
7206 && pkg.applicationInfo.targetSdkVersion < npi.sdkVersion) {
7317 final boolean systemApp = isSystemApp(a.info.applicationInfo);
7330 Log.w(TAG, "Package " + a.info.applicationInfo.packageName + " has activity "
7392 return (ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0
7413 if (mSafeMode && (activity.info.applicationInfo.flags
7414 &ApplicationInfo.FLAG_SYSTEM) == 0) {
7444 res.system = isSystemApp(res.activityInfo.applicationInfo);
7611 return (ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0
7633 if (mSafeMode && (service.info.applicationInfo.flags
7634 &ApplicationInfo.FLAG_SYSTEM) == 0) {
7660 res.system = isSystemApp(res.serviceInfo.applicationInfo);
7835 return (ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0
7858 if (mSafeMode && (provider.info.applicationInfo.flags
7859 & ApplicationInfo.FLAG_SYSTEM) == 0) {
7883 res.system = isSystemApp(res.providerInfo.applicationInfo);
8457 return pkg.applicationInfo.uid;
8636 final int flags = (res.pkg == null) ? 0 : res.pkg.applicationInfo.flags;
8638 && ((flags & ApplicationInfo.FLAG_ALLOW_BACKUP) != 0);
8663 bm.restoreAtInstall(res.pkg.applicationInfo.packageName, token);
8954 if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
9555 pkg.applicationInfo.setCodePath(pkg.codePath);
9556 pkg.applicationInfo.setBaseCodePath(pkg.baseCodePath);
9557 pkg.applicationInfo.setSplitCodePaths(pkg.splitCodePaths);
9558 pkg.applicationInfo.setResourcePath(pkg.codePath);
9559 pkg.applicationInfo.setBaseResourcePath(pkg.baseCodePath);
9560 pkg.applicationInfo.setSplitResourcePaths(pkg.splitCodePaths);
9861 pkg.applicationInfo.setCodePath(pkg.codePath);
9862 pkg.applicationInfo.setBaseCodePath(pkg.baseCodePath);
9863 pkg.applicationInfo.setSplitCodePaths(pkg.splitCodePaths);
9864 pkg.applicationInfo.setResourcePath(pkg.codePath);
9865 pkg.applicationInfo.setBaseResourcePath(pkg.baseCodePath);
9866 pkg.applicationInfo.setSplitResourcePaths(pkg.splitCodePaths);
10292 final int[] uidArray = new int[] { deletedPackage.applicationInfo.uid };
10294 pkgList.add(deletedPackage.applicationInfo.packageName);
10361 if ((deletedPackage.applicationInfo.flags&ApplicationInfo.FLAG_PRIVILEGED) != 0) {
10376 if((oldPkg == null) || (oldPkg.applicationInfo == null) ||
10384 killApplication(packageName, oldPkg.applicationInfo.uid, "replace sys pkg");
10386 res.removedInfo.uid = oldPkg.applicationInfo.uid;
10398 deletedPackage.applicationInfo.getCodePath(),
10399 deletedPackage.applicationInfo.getResourcePath(),
10400 deletedPackage.applicationInfo.nativeLibraryRootDir,
10401 getAppDexInstructionSets(deletedPackage.applicationInfo));
10411 pkg.applicationInfo.flags |= ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
10514 res.uid = newPackage.applicationInfo.uid;
10556 if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_TEST_ONLY) != 0) {
10642 if (ps.pkg != null && ps.pkg.applicationInfo != null) {
10643 systemApp = (ps.pkg.applicationInfo.flags &
10644 ApplicationInfo.FLAG_SYSTEM) != 0;
10719 return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0;
10722 private static boolean isForwardLocked(ApplicationInfo info) {
10723 return (info.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0;
10727 return (ps.pkgFlags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0;
10731 return (ps.pkgFlags & ApplicationInfo.FLAG_MULTIARCH) != 0;
10734 private static boolean isMultiArch(ApplicationInfo info) {
10735 return (info.flags & ApplicationInfo.FLAG_MULTIARCH) != 0;
10739 return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
10743 return (ps.pkgFlags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
10746 private static boolean isExternal(ApplicationInfo info) {
10747 return (info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
10751 return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
10755 return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_PRIVILEGED) != 0;
10758 private static boolean isSystemApp(ApplicationInfo info) {
10759 return (info.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
10763 return (ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0;
10767 return (ps.pkgFlags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
10771 return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
10774 private static boolean isUpdatedSystemApp(ApplicationInfo info) {
10775 return (info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
11496 if (pkg != null && pkg.applicationInfo != null) {
11497 final int appId = pkg.applicationInfo.uid;
11504 if (pkg != null && pkg.applicationInfo.primaryCpuAbi != null &&
11505 !VMRuntime.is64BitAbi(pkg.applicationInfo.primaryCpuAbi)) {
11506 final String nativeLibPath = pkg.applicationInfo.nativeLibraryDir;
11578 final ApplicationInfo applicationInfo = p.applicationInfo;
11579 if (applicationInfo == null) {
11580 Slog.w(TAG, "Package " + packageName + " has no applicationInfo.");
11638 String secureContainerId = cidFromCodePath(p.applicationInfo.getBaseCodePath());
11646 final ApplicationInfo applicationInfo = p.applicationInfo;
11647 if (applicationInfo == null) {
11648 Slog.w(TAG, "Package " + packageName + " has no applicationInfo.");
11652 publicSrcDir = applicationInfo.getBaseResourcePath();
11701 int v = ps.pkg.applicationInfo.targetSdkVersion;
11709 return ps.pkg.applicationInfo.targetSdkVersion;
11850 if (pkg == null || pkg.applicationInfo.uid != uid) {
12089 if (!UserHandle.isSameApp(pi.applicationInfo.uid, callingUid)) {
12195 if (pkg.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.JELLY_BEAN) {
12800 if (p.info != null && p.info.applicationInfo != null) {
12801 final String appInfo = p.info.applicationInfo.toString();
12802 pw.print(" applicationInfo="); pw.println(appInfo);
13108 pkg.applicationInfo.uid);
13251 if (pkg.applicationInfo != null && isSystemApp(pkg)) {
13400 if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0) {
13553 if (pkg.applicationInfo.uid != Binder.getCallingUid()