Lines Matching refs:ps

664                             PackageSetting ps = mSettings.mPackages.get(ent.getKey());
665 uids[i] = (ps != null) ? ps.appId : -1;
1177 PackageSetting ps = psit.next();
1183 if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0) {
1190 final PackageParser.Package scannedPkg = mPackages.get(ps.name);
1199 if (mSettings.isDisabledSystemPackageLPr(ps.name)) {
1200 Slog.i(TAG, "Expecting better updatd system app for " + ps.name
1202 removePackageLI(ps, true);
1208 if (!mSettings.isDisabledSystemPackageLPr(ps.name)) {
1210 String msg = "System package " + ps.name
1213 removeDataDirsLI(ps.name);
1215 final PackageSetting disabledPs = mSettings.getDisabledSystemPkgLPr(ps.name);
1217 possiblyDeletedUpdatedSystemApps.add(ps.name);
1340 final PackageSetting ps = mSettings.mPackages.get(packageName);
1341 if (ps == null) {
1345 if (!ps.grantedPermissions
1373 void cleanupInstallFailedPackage(PackageSetting ps) {
1374 Slog.i(TAG, "Cleaning up incompletely installed app: " + ps.name);
1375 removeDataDirsLI(ps.name);
1376 if (ps.codePath != null) {
1377 if (!ps.codePath.delete()) {
1378 Slog.w(TAG, "Unable to remove old code file: " + ps.codePath);
1381 if (ps.resourcePath != null) {
1382 if (!ps.resourcePath.delete() && !ps.resourcePath.equals(ps.codePath)) {
1383 Slog.w(TAG, "Unable to remove old code file: " + ps.resourcePath);
1386 mSettings.removePackageLPw(ps.name);
1605 final PackageSetting ps = (PackageSetting) p.mExtras;
1606 if (ps == null) {
1609 final GrantedPermissions gp = ps.sharedUser != null ? ps.sharedUser : ps;
1610 final PackageUserState state = ps.readUserState(userId);
1612 ps.firstInstallTime, ps.lastUpdateTime, gp.grantedPermissions,
1647 PackageSetting ps = mSettings.mPackages.get(names[i]);
1648 out[i] = ps != null && ps.realName != null ? ps.realName : names[i];
1676 PackageSetting ps = mSettings.mPackages.get(packageName);
1677 if((ps == null) || (ps.pkg == null) || (ps.pkg.applicationInfo == null)) {
1680 p = ps.pkg;
1693 final PackageSetting ps = (PackageSetting)p.mExtras;
1694 final SharedUserSetting suid = ps.sharedUser;
1695 int[] gids = suid != null ? suid.gids : ps.gids;
1782 PackageSetting ps = mSettings.mPackages.get(packageName);
1783 if (ps != null) {
1784 if (ps.pkg == null) {
1792 return PackageParser.generateApplicationInfo(ps.pkg, flags,
1793 ps.readUserState(userId), userId);
1801 PackageSetting ps = mSettings.mPackages.get(packageName);
1802 if (ps != null) {
1803 PackageParser.Package pkg = ps.pkg;
1810 pkg.applicationInfo.flags = ps.pkgFlags | ApplicationInfo.FLAG_IS_DATA_ONLY;
1811 pkg.applicationInfo.publicSourceDir = ps.resourcePathString;
1812 pkg.applicationInfo.sourceDir = ps.codePathString;
1815 pkg.applicationInfo.nativeLibraryDir = ps.nativeLibraryPathString;
1817 // pkg.mSetEnabled = ps.getEnabled(userId);
1818 // pkg.mSetStopped = ps.getStopped(userId);
1835 PackageSetting ps = mSettings.mPackages.get(packageName);
1836 if (ps == null) return null;
1839 p, flags, ps.readUserState(userId), userId);
1914 PackageSetting ps = mSettings.mPackages.get(component.getPackageName());
1915 if (ps == null) return null;
1916 return PackageParser.generateActivityInfo(a, flags, ps.readUserState(userId),
1935 PackageSetting ps = mSettings.mPackages.get(component.getPackageName());
1936 if (ps == null) return null;
1937 return PackageParser.generateActivityInfo(a, flags, ps.readUserState(userId),
1953 PackageSetting ps = mSettings.mPackages.get(component.getPackageName());
1954 if (ps == null) return null;
1955 return PackageParser.generateServiceInfo(s, flags, ps.readUserState(userId),
1971 PackageSetting ps = mSettings.mPackages.get(component.getPackageName());
1972 if (ps == null) return null;
1973 return PackageParser.generateProviderInfo(p, flags, ps.readUserState(userId),
2031 PackageSetting ps = (PackageSetting)p.mExtras;
2032 if (ps.sharedUser != null) {
2033 if (ps.sharedUser.grantedPermissions.contains(permName)) {
2036 } else if (ps.grantedPermissions.contains(permName)) {
2244 final PackageSetting ps = (PackageSetting) pkg.mExtras;
2245 if (ps == null) {
2248 final GrantedPermissions gp = ps.sharedUser != null ? ps.sharedUser : ps;
2250 if (ps.haveGids) {
2280 final PackageSetting ps = (PackageSetting) pkg.mExtras;
2281 if (ps == null) {
2284 final GrantedPermissions gp = ps.sharedUser != null ? ps.sharedUser : ps;
2287 if (ps.haveGids) {
2389 final PackageSetting ps = (PackageSetting) obj;
2390 return new String[] { ps.name };
2404 final PackageSetting ps = (PackageSetting) obj;
2405 return ps.name;
2917 final PackageSetting ps = mSettings.mPackages.get(packageName);
2918 if (ps != null) {
2919 pi = generatePackageInfoFromSettingsLPw(ps.name, flags, userId);
2965 final PackageSetting ps = mSettings.mPackages.get(packageName);
2967 if (ps != null) {
2968 ai = generateApplicationInfoFromSettingsLPw(ps.name, flags, userId);
2972 if (p != null && ps != null) {
2974 ps.readUserState(userId), userId);
3003 PackageSetting ps = mSettings.mPackages.get(p.packageName);
3004 if (ps != null) {
3006 ps.readUserState(userId), userId);
3024 PackageSetting ps = provider != null
3027 return ps != null
3032 ps.readUserState(userId), userId)
3050 PackageSetting ps = mSettings.mPackages.get(p.owner.packageName);
3052 if (ps != null && p.syncable
3056 ps.readUserState(userId), userId);
3077 PackageSetting ps = mSettings.mPackages.get(p.owner.packageName);
3078 if (ps != null && p.info.authority != null
3089 ps.readUserState(userId), userId);
3192 private boolean collectCertificatesLI(PackageParser pp, PackageSetting ps,
3195 if (ps != null
3196 && ps.codePath.equals(srcFile)
3197 && ps.timeStamp == srcFile.lastModified()) {
3198 if (ps.signatures.mSignatures != null
3199 && ps.signatures.mSignatures.length != 0) {
3202 pkg.mSignatures = ps.signatures.mSignatures;
3206 Slog.w(TAG, "PackageSetting for " + ps.name + " is missing signatures. Collecting certs again to recover them.");
3237 PackageSetting ps = null;
3246 ps = mSettings.peekPackageLPr(oldName);
3249 if (ps == null) {
3250 ps = mSettings.peekPackageLPr(pkg.packageName);
3255 updatedPkg = mSettings.getDisabledSystemPkgLPr(ps != null ? ps.name : pkg.packageName);
3259 if (ps != null && !ps.codePath.equals(scanFile)) {
3263 if (pkg.mVersionCode < ps.versionCode) {
3266 Log.i(TAG, "Package " + ps.name + " at " + scanFile
3267 + " ignored: updated version " + ps.versionCode
3281 mPackages.remove(ps.name);
3283 Slog.w(TAG, "Package " + ps.name + " at " + scanFile
3284 + "reverting from " + ps.codePathString
3286 + " better than installed " + ps.versionCode);
3288 InstallArgs args = createInstallArgs(packageFlagsToInstallFlags(ps),
3289 ps.codePathString, ps.resourcePathString, ps.nativeLibraryPathString);
3294 mSettings.enableSystemPackageLPw(ps.name);
3306 if (!collectCertificatesLI(pp, ps, pkg, scanFile, parseFlags)) {
3316 if (updatedPkg == null && ps != null
3317 && (parseFlags & PackageParser.PARSE_IS_SYSTEM_DIR) != 0 && !isSystemApp(ps)) {
3322 if (compareSignatures(ps.signatures.mSignatures, pkg.mSignatures)
3325 ps = null;
3332 if (pkg.mVersionCode < ps.versionCode) {
3341 Slog.w(TAG, "Package " + ps.name + " at " + scanFile + "reverting from "
3342 + ps.codePathString + ": new version " + pkg.mVersionCode
3343 + " better than installed " + ps.versionCode);
3344 InstallArgs args = createInstallArgs(packageFlagsToInstallFlags(ps),
3345 ps.codePathString, ps.resourcePathString, ps.nativeLibraryPathString);
3356 if (ps != null && !ps.codePath.equals(ps.resourcePath)) {
3363 if (ps != null && ps.resourcePathString != null) {
3364 resPath = ps.resourcePathString;
4498 void removePackageLI(PackageSetting ps, boolean chatty) {
4501 Log.d(TAG, "Removing package " + ps.name);
4506 mPackages.remove(ps.name);
4507 if (ps.codePathString != null) {
4508 mAppDirs.remove(ps.codePathString);
4511 final PackageParser.Package pkg = ps.pkg;
4770 final PackageSetting ps = (PackageSetting) pkg.mExtras;
4771 if (ps == null) {
4774 final GrantedPermissions gp = ps.sharedUser != null ? ps.sharedUser : ps;
4779 ps.permissionsFixed = false;
4780 if (gp == ps) {
4797 if (gp != ps) {
4855 if (gp != ps) {
4860 if ((ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0
4861 && ps.permissionsFixed) {
4888 } else if (!ps.haveGids) {
4919 if ((changedPermission || replace) && !ps.permissionsFixed &&
4920 ((ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0) ||
4921 ((ps.pkgFlags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0)){
4925 ps.permissionsFixed = true;
4927 ps.haveGids = true;
5043 PackageSetting ps = (PackageSetting)p.mExtras;
5044 if (ps != null) {
5048 return (ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0
5049 && ps.getStopped(userId);
5072 PackageSetting ps = (PackageSetting) activity.owner.mExtras;
5073 if (ps == null) {
5077 ps.readUserState(userId), userId);
5240 PackageSetting ps = (PackageSetting)p.mExtras;
5241 if (ps != null) {
5245 return (ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0
5246 && ps.getStopped(userId);
5270 PackageSetting ps = (PackageSetting) service.owner.mExtras;
5271 if (ps == null) {
5275 ps.readUserState(userId), userId);
5511 PackageSetting ps = null;
5516 ps = mSettings.mPackages.get(p.applicationInfo.packageName);
5517 if (ps != null) {
5518 removedUsers = ps.queryInstalledUsers(sUserManager.getUserIds(), true);
5526 if (ps != null) {
5527 removePackageLI(ps, true);
5528 removedPackage = ps.name;
5529 removedAppId = ps.appId;
7889 PackageSetting ps = mSettings.mPackages.get(pkgName);
7890 if (ps != null) {
7892 if (ps.pkg != null && ps.pkg.applicationInfo != null) {
7893 systemApp = (ps.pkg.applicationInfo.flags &
7896 res.origUsers = ps.queryInstalledUsers(sUserManager.getUserIds(), true);
7922 final PackageSetting ps = mSettings.mPackages.get(pkgName);
7923 if (ps != null) {
7924 res.newUsers = ps.queryInstalledUsers(sUserManager.getUserIds(), true);
7934 private boolean isForwardLocked(PackageSetting ps) {
7935 return (ps.pkgFlags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0;
7942 private static boolean isExternal(PackageSetting ps) {
7943 return (ps.pkgFlags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
7954 private static boolean isSystemApp(PackageSetting ps) {
7955 return (ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0;
7962 private int packageFlagsToInstallFlags(PackageSetting ps) {
7964 if (isExternal(ps)) {
7967 if (isForwardLocked(ps)) {
8150 private void removePackageDataLI(PackageSetting ps, PackageRemovedInfo outInfo,
8152 String packageName = ps.name;
8153 removePackageLI(ps, (flags&REMOVE_CHATTY) != 0);
8257 private boolean deleteInstalledPackageLI(PackageSetting ps,
8261 outInfo.uid = ps.appId;
8265 removePackageDataLI(ps, outInfo, flags, writeSettings);
8269 outInfo.args = createInstallArgs(packageFlagsToInstallFlags(ps), ps.codePathString,
8270 ps.resourcePathString, ps.nativeLibraryPathString);
8285 PackageSetting ps;
8290 ps = mSettings.mPackages.get(packageName);
8291 if (ps == null) {
8295 if (!isSystemApp(ps) && user != null
8300 ps.setUserState(user.getIdentifier(),
8306 if (ps.isAnyInstalled(sUserManager.getUserIds())) {
8311 appId = ps.appId;
8316 ps.setInstalled(true, user.getIdentifier());
8336 removePackageDataLI(ps, outInfo, flags, writeSettings);
8340 if (isSystemApp(ps)) {
8341 Log.i(TAG, "Removing system package:" + ps.name);
8344 ret = deleteSystemPackageLI(ps, flags, outInfo, writeSettings);
8346 Log.i(TAG, "Removing non-system package:" + ps.name);
8348 killApplication(packageName, ps.appId);
8349 ret = deleteInstalledPackageLI(ps, deleteCodeAndResources, flags, outInfo,
8485 PackageSetting ps = mSettings.mPackages.get(packageName);
8486 if((ps == null) || (ps.pkg == null)) {
8490 p = ps.pkg;
8596 PackageSetting ps = mSettings.mPackages.get(packageName);
8597 if((ps == null) || (ps.pkg == null)) {
8601 p = ps.pkg;
8656 final PackageSetting ps = it.next();
8657 if (ps.pkg != null) {
8658 int v = ps.pkg.applicationInfo.targetSdkVersion;
8664 final PackageSetting ps = (PackageSetting) obj;
8665 if (ps.pkg != null) {
8666 return ps.pkg.applicationInfo.targetSdkVersion;
9580 final PackageSetting ps = mSettings.mPackages.get(pkgName);
9581 if (ps == null) {
9591 if (externalStorage && !isMounted && !isExternal(ps)) {
9595 final AsecInstallArgs args = new AsecInstallArgs(cid, isForwardLocked(ps));
9598 if (ps.codePathString != null && ps.codePathString.equals(args.getCodePath())) {
9601 + " at code path: " + ps.codePathString);
9605 processCids.put(args, ps.codePathString);
9606 final int uid = ps.appId;
10008 PackageSetting ps = (PackageSetting) pkg.mExtras;
10009 ps.codePath = new File(pkg.applicationInfo.sourceDir);
10010 ps.codePathString = ps.codePath.getPath();
10011 ps.resourcePath = new File(
10013 ps.resourcePathString = ps.resourcePath.getPath();
10014 ps.nativeLibraryPathString = newNativePath;
10022 ps.setFlags(pkg.applicationInfo.flags);