OMS: replace OMSImpl.OverlayChangeListener with return values
Remove the listener callback triggered when the OMS settings have
changed. Teach the OMSImpl methods to return the equivalent information
instead: an Optional<T> of the target package and Android user who's
overlays need to be refreshed, or an exception in case of error.
This is the first step towards an OMS transactional API, where multiple
requests can be batched together and the outcome is either that all
operations succeed, or some operation fails and (to the outside system)
nothing happens. Replacing callbacks with explicit return values allow
the caller more control of what data is exposed to the rest of Android.
Bug: 119916381
Test: atest FrameworksServicesTests:com.android.server.om OverlayDeviceTests OverlayHostTests CtsAppSecurityHostTestCases:OverlayHostTest
Change-Id: If58d5e9ddeec649e708224bb29efcc38ebe51bf7
6 files changed