OSDN Git Service

Stop recording unsupported class loaders.
authorAlan Stokes <alanstokes@google.com>
Tue, 30 Oct 2018 15:05:36 +0000 (15:05 +0000)
committerAlan Stokes <alanstokes@google.com>
Mon, 5 Nov 2018 11:13:46 +0000 (11:13 +0000)
commit6dba50d63375b6738c6e1ad8a8758f181d295d8b
tree685fde1985ac98f24594fee369c257f61dc8b2f9
parent89eb3e6117b39c9e9272e898e33a3be8fa669889
Stop recording unsupported class loaders.

Don't record anything if any of the classloaders in the chain are
unsupported.  (This is slightly unsubtle, but matchs the existing
behavior - see below.) We can't correctly DexOpt secondary dex files
in this case anyway.

Also discard any existing records of unsupported classloaders on read.

Currently this is almost a no-op: BaseDexClassLoader doesn't notify if
there are any unknown class loaders, since
5ac512c07cfa80160e240c359349c1390a20a981, so the new check is
reachable only if there's some sort of mismatch. But I'm going to
change that soon.

Tightened up visibility a bit too.

Bug: 111336847
Test: atest --test-mapping services/core/java/com/android/server/pm/dex
Change-Id: I6af5620a73be7b6440cbafdf6a5c1da1082cbdd4
services/core/java/com/android/server/pm/dex/DexManager.java
services/core/java/com/android/server/pm/dex/PackageDexUsage.java
services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java