Merge "Refine getPackageInfo for Apex match policy"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d5e956fa50
@@ -335,8 +335,8 @@ abstract class ApexManager {
|
||||
if (!packageInfo.packageName.equals(packageName)) {
|
||||
continue;
|
||||
}
|
||||
if ((!matchActive || isActive(packageInfo))
|
||||
&& (!matchFactory || isFactory(packageInfo))) {
|
||||
if ((matchActive && isActive(packageInfo))
|
||||
|| (matchFactory && isFactory(packageInfo))) {
|
||||
return packageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4092,7 +4092,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
}
|
||||
return generatePackageInfo(ps, flags, userId);
|
||||
}
|
||||
if (!matchFactoryOnly && (flags & MATCH_APEX) != 0) {
|
||||
if ((flags & MATCH_APEX) != 0) {
|
||||
return mApexManager.getPackageInfo(packageName, ApexManager.MATCH_ACTIVE_PACKAGE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user