Cache results of getProfileParent calls
This reduces number of Binder calls that Bluetooth stack is making.
Currently some apps would call AdapterService getRemoteClass,
getRemoteName, and getRemoteAlias for each scan result. Each of those
calls would trigger the call to getProfileParent as part of permission
check. After this patch, the result is cached for two seconds.
Test: observe result of "adb shell dumpsys binder_calls_stats" during
scan from settings
Bug: 125739276
Change-Id: Ib34525eb38688243fae88dadeb3c6cb89f676356
1 file changed