pm: Disallow HIDL libs from boot jars >= Q.

These two libraries:
android.hidl.base-V1.0-java
android.hidl.manager-V1.0-java

were removed from BOOT_JARS. This change disallows them to be used on
the classpath >= Q. They are still allowed to be used <= P for legacy
reasons.

Test: atest android.content.pm.AndroidHidlUpdaterTest
Test: build & boot Pixel 2
Fixes: 77307025

Change-Id: I7752812318030cbaa15f42301c168371ceade901
This commit is contained in:
Steven Moreland
2018-10-17 18:16:51 -07:00
parent 95a384daf7
commit ae88825916
2 changed files with 19 additions and 10 deletions

View File

@@ -38,6 +38,9 @@ public class AndroidHidlUpdater extends PackageSharedLibraryUpdater {
if (pkg.applicationInfo.targetSdkVersion <= Build.VERSION_CODES.P) {
prefixRequiredLibrary(pkg, ANDROID_HIDL_BASE);
prefixRequiredLibrary(pkg, ANDROID_HIDL_MANAGER);
} else {
removeLibrary(pkg, ANDROID_HIDL_BASE);
removeLibrary(pkg, ANDROID_HIDL_MANAGER);
}
}
}