diff options
author | JW Wang <wangchun@google.com> | 2020-07-17 10:12:51 +0800 |
---|---|---|
committer | JW Wang <wangchun@google.com> | 2020-07-22 15:22:14 +0800 |
commit | 82278d78b782b8aefa1121b61de2f7e9bd500511 (patch) | |
tree | 405cf3a05c6b4d88f0c11ac72967811ccba9bb24 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | a39f84ee3504b2404e526a67b69a340738a87f22 (diff) |
Rewrite some methods (3/n)
1. Now #isInstallerDeviceOwnerOrAffiliatedProfileOwner should be called
outside the lock because it accesses external entities.
2. Now #needToAskForPermissions should be called outside the lock
for the same reason above.
3. #sendOnUserActionRequired, #sendOnPackageInstalled and
#sendPendingStreaming are now called outside the lock.
4. Rewrite #installNonStagedLocked so mPm.installStage() is called
outside the lock.
5. Split #makeSessionActive into 2 parts so permission checks
can be done outside the lock.
Note the original code is flawed in that
session.makeSessionActiveLocked() [1] is called without session.mLock
held. This is also fixed by this CL.
[1]
https://source.corp.google.com/android/frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java;rcl=d07f2fc343d37100303696fcfeb603232b5087ce;l=1755
Bug: 161199857
Test: atest StagedInstallTest AtomicInstallTest
Change-Id: I1f4a28259f185d8792bac5a9c8a974df53e7d3fb
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions