summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authoroleksii stepanian <aste@google.com>2015-06-19 15:32:41 -0700
committeroleksii stepanian <aste@google.com>2015-06-19 15:32:41 -0700
commit161bd9aae46088cb62e78af428ef9f2b1172c0dc (patch)
treeecf29d41e5ffac8b978a291b11e999a4a6fb12f7 /packages
parentb0ff3a6cb37aa45add4b0c5135bd978442fcc441 (diff)
downloadframeworks_base-161bd9aae46088cb62e78af428ef9f2b1172c0dc.zip
frameworks_base-161bd9aae46088cb62e78af428ef9f2b1172c0dc.tar.gz
frameworks_base-161bd9aae46088cb62e78af428ef9f2b1172c0dc.tar.bz2
Fix race condition in PackageManager.
When Google Play installs 2 apps concurrently (e.g. personal and work profile) PackageManager can hit a race condition when connection to media container has not yet been established but the MCS_BOUND event is triggered from MCS_UNBIND. Detailed step by step scenario: 1. package1 comes in 2. INIT_COPY (initiate bind, add pending install) 3. onServiceConnected triggers (MSC_BOUND) 4. MSC_BOUND, process pending package and schedule MSC_UNBIND 5. MSC_UNBIND is triggered once the package is verified 6. service is diconnected 7. package2 comes in 8. INIT_COPY (initiate bind, add pending install) 9. MSC_UNBIND scheduled at step 4 10. MSC_UNBIND sees that there is a pending package, schedules MSC_BIND 11. MSC_BIND arrives before service is connected and we fail. Solution: do not fail if we wait for connection. Bug: 21849046 Change-Id: I39928e1efc81ba64e45c622cc08cb786801d6569
Diffstat (limited to 'packages')
0 files changed, 0 insertions, 0 deletions