Avoid redundant AdditionalSubtypeMapRepository#putAndSave()
This is a follow up CL to my previous CLs [1][2][3], which aimed to fix bugs that additional subtypes were cleared only when the current user's IME APKs were updated but not for other users'. What this CL does it to avoid unnecessary file operations by making sure that AdditionalSubtypeMapRepository#putAndSave() gets called only once from MyPackageMonitor#onFinishPackageChangesInternal(). This guarantees that for each package callback transactions additional subtype persistent file will be saved at most once, compared to multiple times in the previous implementation. Hopefully this helps mitivate the potential performance regression discussed in Bug 327861441. The observable behavior should remain the same semantically. [1]: I07e32739f486d960c9dd22476120fa35bf1899e4 0c5feb22 [2]: I10aa547f0de607ef3c0ba26764dac0585c40c843 2501e749 [3]: If42c518765171ff8cb51af000542671676cd3801 87218eb2 Bug: 309837937 Bug: 322062773 Bug: 327861441 Bug: 328098968 Test: presubmit Change-Id: I5b3dae7579feb412517251c6c8ad770b49831600
Loading
Please register or sign in to comment