Add self-targeting constructor in FabaricatedOverlay
When the app wants to overlay its resource in runtime, it’s a
SelfTargeting scenario. This patch adds a new builder
constructor in FabaricatedOverlay for SelfTargeting. It's
`Builder(@NonNull String overlayName, @NonNull String targetPackage)`.
The app needs to pass 2 parameters.
* the overlay name
* target package to be overlaid
This patch also marks the nullability and checks the arguments of
`setResourceValue` and it needs related CTS tests to verify the
nullability.
* setResourceValue
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
idmap2_tests
Bug: 205919743
Change-Id: Ie8e2de13076c9d28bbcf7ee52deab91114f7ec57
2 files changed