Enables child APKs, fixes a package parsing bug, and adds tests.
1. Enables child APKs by default. (This is primarily so the tests work, but I'm open to other options.) 2. Fixes bug where child packages would steal their parent's components of the same type of the parent. (e.g. if the child has a service, it would steal all of the parent's services, but only reproduced for more complicated manifests) This changes the way component parse args are cached and reused. Previously they were cached in a field and reset each time a new package was scanned. But with child APKs, a single manifest can have multiple packages. Now, the lifetime of the cache is limited to a single <application> element, and rather than being a member field, it's passed explicitly as a parameter so its lifetime can be explicitly controlled without the need to remember to null it. 3. Adds tests for the bug PackageParser These tests just test the parsing component without doing full installation. And once b/62385737 (failing tests) are fixed, we can add new PackageManagerTests. Change-Id: Iccd148b571af86daab48d7a9e28ab6d636b1ad00 Fixes: 62032885 Test: Tested a large app with a child package and the previous issue did not reproduce after this change.
Loading
Please register or sign in to comment