Propagate base code path and split dir changes to Resources objects
When split APK loading is deferred, like a dynamic feature module or delayed install, the ResourcesImpl for old Resources objects weren't being updated. This is because the stable key used was "mResDir", which corresponds to a path with a random hash ID suffixed to the end of the APKs, like com.example.android-RANDOMHASH/base.apk. Because RANDOMHASH changes every time a package is updated (like installing a split), the stable key is no longer valid for old Resources objects. That means they would never get notified that the package resource directories could have changed. There was a partial solution added 2 years ago to solve this case for refreshing overlays. This extends the solution to replace base code paths and split dirs, as well as force updates to Resources with the old code paths. The original breakage started from P, but I was unable to narrow down what caused it. This bug should've existed in O, but maybe a separate, unrelated resources behavior allowed it to work. And given that, I don't know of a workaround for current instant apps. Bug: 112392906 Bug: 116167993 Test: manual test Dotloop IA in b/112392906 Test: manual test Hollar IA in b/116167993 Change-Id: I73491fa2b9397a489765ddac8f0a07a797f02028
Loading
Please register or sign in to comment