Skip to content
Permalink
Browse files

pm: PackageBackwardCompatibility -> applyPolicy

This moves PackageBackwardCompatibility from parsePackage to
applyPolicy.

The motivation of this is to expose partition information to these
files. Specifically, to expose whether the app is a pre-installed
(or updated pre-installed app) for certain backwards compatibility
rules that should only apply to these cases.

Bug: 86259915
Test: boot Pixel 2
Test: Pixel 3: atest -p cts/tests/signature
- all passed except for CtsSystemApiAnnotationTestCases test which
  failed (known issue b/124210145)
Change-Id: Ic824f06489781233dc98bf3dc0182681d32f7142

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
  • Loading branch information...
smore-lore authored and neobuddy89 committed Mar 6, 2019
1 parent 8fca1e4 commit dc64793954cbe9af083ae983d3c9d84fcbf6664d
@@ -3830,8 +3830,6 @@ private boolean parseBaseApplication(Package owner, Resources res,
// every activity info has had a chance to set it from its attributes.
setMaxAspectRatio(owner);

PackageBackwardCompatibility.modifySharedLibraries(owner);

if (hasDomainURLs(owner)) {
owner.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_HAS_DOMAIN_URLS;
} else {
@@ -160,6 +160,7 @@
import android.content.pm.InstantAppResolveInfo;
import android.content.pm.InstrumentationInfo;
import android.content.pm.IntentFilterVerificationInfo;
import android.content.pm.PackageBackwardCompatibility;
import android.content.pm.KeySet;
import android.content.pm.PackageCleanItem;
import android.content.pm.PackageInfo;
pkg.mRealPackage = null;
pkg.mAdoptPermissions = null;
}

PackageBackwardCompatibility.modifySharedLibraries(pkg);
}

private static @NonNull <T> T assertNotNull(@Nullable T object, String message)

0 comments on commit dc64793

Please sign in to comment.
You can’t perform that action at this time.