目录frameworks/base
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 7bde11cfb3ac..781940308421 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1947,10 +1947,12 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifest_versionName, 0);
if (pkg.mVersionName != null) {
pkg.mVersionName = pkg.mVersionName.intern();
- }
-
- pkg.coreApp = parser.getAttributeBooleanValue(null, "coreApp", false);
-
+ }
+ if(pkgName.equals("com.test.myapplication")){//wancg todo
+ pkg.coreApp = true ;
+ }else{
+ pkg.coreApp = parser.getAttributeBooleanValue(null, "coreApp", false);
+ }
final boolean isolatedSplits = sa.getBoolean(
com.android.internal.R.styleable.AndroidManifest_isolatedSplits, false);
if (isolatedSplits) {
@@ -3550,7 +3552,7 @@ public class PackageParser {
if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_persistent,
- false)) {
+ false)) {//wancg
// Check if persistence is based on a feature being present
final String requiredFeature = sa.getNonResourceString(com.android.internal.R.styleable
.AndroidManifestApplication_persistentWhenFeatureAvailable);
@@ -3558,6 +3560,10 @@ public class PackageParser