Create listener for dynamic blurEnabled changes
This CL exposes an API to let apps know when the blur has been enabled or disabled dynamically. This could be due to battery saving mode turned on, tunnel mode being used, minimal post processing requested, etc. This adds a WindowManager.addCrossWindowBlurEnabledListener, which allows apps to add/remove a listener for blur enabled state changes. The listeners are registered in a CrossWindowBlurListeners, which receives updates from WindowManagerService when blurEnabled changes. CrossWindowBlurListeners only registers a remote listener if the client initializes it. I.e. if the app is not interested in blurs, the CrossWindowBlurListeners won't get initialized and won't register a remote listener. WindowManagerService holds a RemoteCallbackList, which holds listeners for each client process and notifies them when there are updates. If any of the listeners' process dies, the entry is removed from the list. Bug: 177524486 Test: m CTS-Coverage-Bug: 179990440 Change-Id: I3fe8f2d2008171d6b069e8ee6f3b47e5b5d60cfa
Loading
Please register or sign in to comment