Add IllegalStateException with packageName on null info
This change returns the behavior of initializeJavaContextClassLoader in LoadedApk to throw an IllegalStateException calling out the package it attempted to fetch. This was removed when client-side caching was added resulting in a different stack trace without this critical piece of information that could help make sense of why this is happening. Bug: 180418767 Bug: 140788621 Test: N/A; builds Change-Id: Ia1ceff922f693093012eb6e3e0f6e1d90222cde7
This commit is contained in:
@@ -1110,6 +1110,10 @@ public final class LoadedApk {
|
||||
mPackageName,
|
||||
PackageManager.MATCH_DEBUG_TRIAGED_MISSING,
|
||||
UserHandle.myUserId());
|
||||
if (pi == null) {
|
||||
throw new IllegalStateException("Unable to get package info for "
|
||||
+ mPackageName + "; is package not installed?");
|
||||
}
|
||||
/*
|
||||
* Two possible indications that this package could be
|
||||
* sharing its virtual machine with other packages:
|
||||
|
||||
Reference in New Issue
Block a user