summaryrefslogtreecommitdiff
path: root/libs/androidfw/ResourceTimer.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2025-03-10 15:17:07 +0800
committer Riddle Hsu <riddlehsu@google.com> 2025-03-11 10:26:38 +0800
commitac70b037ff5c389631301a2913811128d41a8c9b (patch)
treeb05e85b0520c69b0d0a30b100323fafd8198185b /libs/androidfw/ResourceTimer.cpp
parent759f9ccce1b30fbe82c7bbc3723b1fc97008a43d (diff)
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
Diffstat (limited to 'libs/androidfw/ResourceTimer.cpp')
0 files changed, 0 insertions, 0 deletions