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
Loading
Please register or sign in to comment