Adds instant app visibility to instumentation
This change grants visibility to instant apps of instrumentation components that are targetting their package name. This allows instrumentation tests to run just as installed apps do. Change-Id: I3786390986cf9a65472da888257833f5b294a937 Fixes: 73078297 Test: manual - connected test passes as instant app Test: atest EphemeralTest passes
This commit is contained in:
@@ -4096,8 +4096,15 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
return false;
|
||||
}
|
||||
if (callerIsInstantApp) {
|
||||
// request for a specific component; if it hasn't been explicitly exposed, filter
|
||||
// request for a specific component; if it hasn't been explicitly exposed through
|
||||
// property or instrumentation target, filter
|
||||
if (component != null) {
|
||||
final PackageParser.Instrumentation instrumentation =
|
||||
mInstrumentation.get(component);
|
||||
if (instrumentation != null
|
||||
&& isCallerSameApp(instrumentation.info.targetPackage, callingUid)) {
|
||||
return false;
|
||||
}
|
||||
return !isComponentVisibleToInstantApp(component, componentType);
|
||||
}
|
||||
// request for application; if no components have been explicitly exposed, filter
|
||||
|
||||
Reference in New Issue
Block a user