Allow androidx.pdf.document.service to be used in chrome
androidx.pdf.document.service has minSdk 31 but chrome's minSdk is
lower. However manifest_merger does not actually check to see if our
usages are actually guarded or not so the error is not useful. Override
minSdk on androidx.pdf
Bug: 378879479
Change-Id: I27c61e74a3b2e22bdaf4ec40280c106ae42316f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6018884
Auto-Submit: Mohamed Heikal <[email protected]>
Reviewed-by: Sam Maier <[email protected]>
Commit-Queue: Sam Maier <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1382386}
NOKEYCHECK=True
GitOrigin-RevId: a886fca96aa6d582b2b94b721d8b5dce62f48a75
diff --git a/android/gyp/merge_manifest.py b/android/gyp/merge_manifest.py
index 67a9fe3..ed1e30f 100755
--- a/android/gyp/merge_manifest.py
+++ b/android/gyp/merge_manifest.py
@@ -53,7 +53,7 @@
package_name = manifest_utils.GetPackage(manifest)
# Ignore minSdkVersion from androidx.pdf library. The client code will ensure
# not to call into the library API on older Android versions.
- if package_name in ('androidx.pdf', 'androidx.pdf.viewer.fragment'):
+ if package_name.startswith('androidx.pdf'):
manifest_utils.OverrideMinSdkVersionIfPresent(manifest, min_sdk_version)
changed_api = True
package_count = seen_package_names[package_name]