Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d11fe3b4 authored by felkachang's avatar felkachang
Browse files

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
parent eaa0ad10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment