Skip to content
Commit d605e2d6 authored by Winson's avatar Winson
Browse files

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
parent 02aefee5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment