Reduce unnecessary query of checking home package
Currently while desktop mode is enabled, each transition will
always invoke home package condition 4 times. The total time of
the binder transactions to package manager could take about 5ms,
that delays the transition play time.
This change caches the package name and updates it when the default
home is changed. So most of the time there is no need to query again.
This lets caller set a supplier if needed. Such as launcher could
consider to use its existing observer:
OverviewComponentObserver.INSTANCE.get(context)
.getHomeIntent().getPackage();
Bug: 365023423
Test: Not showing app handle when launching widget settings
Flag: EXEMPT bugfix
Change-Id: I4e8d72b84c384fc4e00c1f681422d13b3ed201c2
Loading
Please register or sign in to comment