Loading core/java/android/content/pm/PackageParser.java +1 −7 Original line number Diff line number Diff line Loading @@ -2630,12 +2630,6 @@ public class PackageParser { int priority = sa.getInt( com.android.internal.R.styleable.AndroidManifestIntentFilter_priority, 0); if (priority > 0 && isActivity && (flags&PARSE_IS_SYSTEM) == 0) { Log.w(TAG, "Activity with priority > 0, forcing to 0 at " + mArchiveSourcePath + " " + parser.getPositionDescription()); priority = 0; } outInfo.setPriority(priority); TypedValue v = sa.peekValue( Loading services/java/com/android/server/IntentResolver.java +4 −4 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class IntentResolver<F extends IntentFilter, R extends Object> { int num = 0; while (i.hasNext()) { String name = (String)i.next(); String name = i.next(); num++; if (localLOGV) Slog.v(TAG, prefix + name); String baseName = name; Loading Loading @@ -395,7 +395,7 @@ public class IntentResolver<F extends IntentFilter, R extends Object> { int num = 0; while (i.hasNext()) { String name = (String)i.next(); String name = i.next(); num++; if (localLOGV) Slog.v(TAG, prefix + name); String baseName = name; Loading Loading @@ -534,8 +534,8 @@ public class IntentResolver<F extends IntentFilter, R extends Object> { // Sorts a List of IntentFilter objects into descending priority order. private static final Comparator mResolvePrioritySorter = new Comparator() { public int compare(Object o1, Object o2) { float q1 = ((IntentFilter)o1).getPriority(); float q2 = ((IntentFilter)o2).getPriority(); final int q1 = ((IntentFilter) o1).getPriority(); final int q2 = ((IntentFilter) o2).getPriority(); return (q1 > q2) ? -1 : ((q1 < q2) ? 1 : 0); } }; Loading services/java/com/android/server/PackageManagerService.java +12 −2 Original line number Diff line number Diff line Loading @@ -2882,7 +2882,7 @@ class PackageManagerService extends IPackageManager.Stub { SharedUserSetting suid = null; PackageSetting pkgSetting = null; if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) == 0) { if (!isSystemApp(pkg)) { // Only system apps can use these features. pkg.mOriginalPackages = null; pkg.mRealPackage = null; Loading Loading @@ -4080,6 +4080,7 @@ class PackageManagerService extends IPackageManager.Stub { } public final void addActivity(PackageParser.Activity a, String type) { final boolean systemApp = isSystemApp(a.info.applicationInfo); mActivities.put(a.getComponentName(), a); if (SHOW_INFO || Config.LOGV) Log.v( TAG, " " + type + " " + Loading @@ -4088,6 +4089,11 @@ class PackageManagerService extends IPackageManager.Stub { int NI = a.intents.size(); for (int j=0; j<NI; j++) { PackageParser.ActivityIntentInfo intent = a.intents.get(j); if (!systemApp && intent.getPriority() > 0 && "activity".equals(type)) { intent.setPriority(0); Log.w(TAG, "Package " + a.info.applicationInfo.packageName + " has activity " + a.className + " with priority > 0, forcing to 0"); } if (SHOW_INFO || Config.LOGV) { Log.v(TAG, " IntentFilter:"); intent.dump(new LogPrinter(Log.VERBOSE, TAG), " "); Loading Loading @@ -6026,6 +6032,10 @@ class PackageManagerService extends IPackageManager.Stub { return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; } private static boolean isSystemApp(ApplicationInfo info) { return (info.flags & ApplicationInfo.FLAG_SYSTEM) != 0; } private static boolean isUpdatedSystemApp(PackageParser.Package pkg) { return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; } Loading Loading
core/java/android/content/pm/PackageParser.java +1 −7 Original line number Diff line number Diff line Loading @@ -2630,12 +2630,6 @@ public class PackageParser { int priority = sa.getInt( com.android.internal.R.styleable.AndroidManifestIntentFilter_priority, 0); if (priority > 0 && isActivity && (flags&PARSE_IS_SYSTEM) == 0) { Log.w(TAG, "Activity with priority > 0, forcing to 0 at " + mArchiveSourcePath + " " + parser.getPositionDescription()); priority = 0; } outInfo.setPriority(priority); TypedValue v = sa.peekValue( Loading
services/java/com/android/server/IntentResolver.java +4 −4 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class IntentResolver<F extends IntentFilter, R extends Object> { int num = 0; while (i.hasNext()) { String name = (String)i.next(); String name = i.next(); num++; if (localLOGV) Slog.v(TAG, prefix + name); String baseName = name; Loading Loading @@ -395,7 +395,7 @@ public class IntentResolver<F extends IntentFilter, R extends Object> { int num = 0; while (i.hasNext()) { String name = (String)i.next(); String name = i.next(); num++; if (localLOGV) Slog.v(TAG, prefix + name); String baseName = name; Loading Loading @@ -534,8 +534,8 @@ public class IntentResolver<F extends IntentFilter, R extends Object> { // Sorts a List of IntentFilter objects into descending priority order. private static final Comparator mResolvePrioritySorter = new Comparator() { public int compare(Object o1, Object o2) { float q1 = ((IntentFilter)o1).getPriority(); float q2 = ((IntentFilter)o2).getPriority(); final int q1 = ((IntentFilter) o1).getPriority(); final int q2 = ((IntentFilter) o2).getPriority(); return (q1 > q2) ? -1 : ((q1 < q2) ? 1 : 0); } }; Loading
services/java/com/android/server/PackageManagerService.java +12 −2 Original line number Diff line number Diff line Loading @@ -2882,7 +2882,7 @@ class PackageManagerService extends IPackageManager.Stub { SharedUserSetting suid = null; PackageSetting pkgSetting = null; if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) == 0) { if (!isSystemApp(pkg)) { // Only system apps can use these features. pkg.mOriginalPackages = null; pkg.mRealPackage = null; Loading Loading @@ -4080,6 +4080,7 @@ class PackageManagerService extends IPackageManager.Stub { } public final void addActivity(PackageParser.Activity a, String type) { final boolean systemApp = isSystemApp(a.info.applicationInfo); mActivities.put(a.getComponentName(), a); if (SHOW_INFO || Config.LOGV) Log.v( TAG, " " + type + " " + Loading @@ -4088,6 +4089,11 @@ class PackageManagerService extends IPackageManager.Stub { int NI = a.intents.size(); for (int j=0; j<NI; j++) { PackageParser.ActivityIntentInfo intent = a.intents.get(j); if (!systemApp && intent.getPriority() > 0 && "activity".equals(type)) { intent.setPriority(0); Log.w(TAG, "Package " + a.info.applicationInfo.packageName + " has activity " + a.className + " with priority > 0, forcing to 0"); } if (SHOW_INFO || Config.LOGV) { Log.v(TAG, " IntentFilter:"); intent.dump(new LogPrinter(Log.VERBOSE, TAG), " "); Loading Loading @@ -6026,6 +6032,10 @@ class PackageManagerService extends IPackageManager.Stub { return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; } private static boolean isSystemApp(ApplicationInfo info) { return (info.flags & ApplicationInfo.FLAG_SYSTEM) != 0; } private static boolean isUpdatedSystemApp(PackageParser.Package pkg) { return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; } Loading