diff options
| author | Nikita Ioffe <ioffe@google.com> | 2019-03-14 18:40:17 +0000 |
|---|---|---|
| committer | Nikita Ioffe <ioffe@google.com> | 2019-03-15 15:02:12 +0000 |
| commit | 8e5b703c22af9c112579c743386d9e40d8e3f93b (patch) | |
| tree | 79a75754f932c4271915adcfd9ab0b825f043012 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp | |
| parent | 93fc5bb44ae0c8e0194f0e1b364a72d731eb4043 (diff) | |
Properly fail commit of a new staged session if another one is in progress
Previous implementation did not really work because:
* PackageInstallerSession.commit marks session as committed and then
sends MSG_COMMIT message;
* handleCommit calls StagingManager#commitSession;
This means that by the time StagingManager#commitSession(session) is called:
* mStagedSessions already contain session;
* this session is already marked as committed;
As a result, implementation in the ag/6638240 was failing a second committed
session only if it's id is greater than id of the first one.
Why manual testing in the previous CL worked?
I guess, I got lucky and in my case the second session had a greater id.
Bug: 127296534
Test: atest CtsStagedInstallHostTestCases (run 10 times)
Test: adb install --staged foo.apk (10 times with reboots in between)
Change-Id: I78f22d5537a7d074fc69f146dafccee6a6e5e896
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions
