diff options
| author | 2024-01-04 10:19:12 +0000 | |
|---|---|---|
| committer | 2024-01-08 03:52:33 +0000 | |
| commit | 4a77166797276f87c19d0544bc3d788d98d58bc9 (patch) | |
| tree | 8116e64abd6376f216f6535df8eaba8bade52c04 /libs/androidfw/misc.cpp | |
| parent | 535e7b758dfdbccb8e9bc772e273ae9bd3a1d02f (diff) | |
Improve PackageInstallerService.writeSessionsLocked lock hold
PackageInstallerService.writeSessionsLocked() holds mSession lock,
the method PackageInstallerSession.write() needs to access the mLock
in PackageInstallerSession that may be held by other process to
execute a long operation this may cause long API calls that may need
to wait for mSession lock.
To improve the problem, try to reduce lock holding time, copy session
to a local variable. The code doesn't need to acess mLock in mSession
lock to reduce the API call ANR.
Bug: 317945057
Test: manual
Change-Id: Ief0c97d627bebb9075f4bc6b94870d40dcb7bb4f
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions