LoadedApk: Notify cross-package use only when code is requested.
Cross-package use is quite common when only resources are being considered. A common example is that any application that declares itself <searchable /> will see cross package resource only use from the system_server. Test: manual instrumentation. Change-Id: Ic7ad166c71a23c6026f4e12bb52309a50210aaaf
This commit is contained in:
@@ -597,8 +597,7 @@ public final class LoadedApk {
|
||||
// Avoid the binder call when the package is the current application package.
|
||||
// The activity manager will perform ensure that dexopt is performed before
|
||||
// spinning up the process.
|
||||
if (!Objects.equals(mPackageName, ActivityThread.currentPackageName())) {
|
||||
VMRuntime.getRuntime().vmInstructionSet();
|
||||
if (!Objects.equals(mPackageName, ActivityThread.currentPackageName()) && mIncludeCode) {
|
||||
try {
|
||||
ActivityThread.getPackageManager().notifyPackageUse(mPackageName,
|
||||
PackageManager.NOTIFY_PACKAGE_USE_CROSS_PACKAGE);
|
||||
|
||||
Reference in New Issue
Block a user