Public self targeting API
Apps can maintains overlays by using these public APIs.
1. Create a FabricatedOverlay instance and set the overlay content.
2. Get a OverlayManager by calling context.getSystemService(...)
3. Create an OverlayManagerTransaction.
4. Register/unregister the overlays via the OverlayManagerTransaction
5. Commit the OverlayManagerTransaction.
Apps can use the registered overlay to overlay itself resources.
1. Get the overlay information by calling
overlayManager.getOverlayInfosByTarget(...)
2. Create a ResourcesProvider by calling
ResourcesProvider.loadOverlay(overlayInfo)
3. Create a ResourcesLoader to adding the ResourcesProvider in
steps 2.
4. Overlay a Resources instance by calling
Resources.addLoader(...)
This patch removes @hide to public the above APIs.
Bug: 205919743
CTS-Coverage-Bug: 262232910
API-Coverage-Bug: 262232910
Test: make update-api ; make
Test: make online-sdk-docs offline-sdk-docs
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
CtsContentTestCases:android.content.res.loader.cts \
idmap2_tests
Change-Id: I34fee52f55cd2ce63613dfb43e8ab235eca47772
9 files changed