Reduce unnecessary overhead of SystemUiContext
- Do not report change when initializing DisplayContent
(DisplayContent#isReady() is false).
This reduces boot time by dozen of milliseconds
(RootWindowContainer#setWindowManager).
- Only create SystemUiContext if needed. Most of processes don't
use it. This reduces many registrations (e.g. according to the
number of processes, it maybe from ~60 to ~10), which involve
binder/listener creation/invocation, especially the extra cost
of dispatching configuration to the context which no one uses.
- Store token as IWindowToken to avoid object creation every time
by asInterface.
Bug: 207620458
Test: atest InputMethodMenuControllerTest WindowContextControllerTest
Change-Id: I867e9f81116796c42048195406d74feccf4772d3
4 files changed