Merge "Fixes query logic when not instant" into rvc-dev am: f114613079

Change-Id: If0cc62f5c2f2993385f2b4c862369d95e1155eab
This commit is contained in:
Patrick Baumann
2020-03-20 04:37:49 +00:00
committed by Automerger Merge Worker

View File

@@ -7238,8 +7238,8 @@ public class PackageManagerService extends IPackageManager.Stub
resolveInfos.set(i, installerInfo); resolveInfos.set(i, installerInfo);
continue; continue;
} }
// caller is a full app
if (ephemeralPkgName == null) { if (ephemeralPkgName == null) {
// caller is a full app
SettingBase callingSetting = SettingBase callingSetting =
mSettings.getSettingLPr(UserHandle.getAppId(filterCallingUid)); mSettings.getSettingLPr(UserHandle.getAppId(filterCallingUid));
PackageSetting resolvedSetting = PackageSetting resolvedSetting =
@@ -7259,11 +7259,9 @@ public class PackageManagerService extends IPackageManager.Stub
&& intent.getComponent() == null) { && intent.getComponent() == null) {
// ephemeral apps can launch other ephemeral apps indirectly // ephemeral apps can launch other ephemeral apps indirectly
continue; continue;
} } else if (((info.activityInfo.flags & ActivityInfo.FLAG_VISIBLE_TO_INSTANT_APP) != 0)
// allow activities that have been explicitly exposed to ephemeral apps && !info.activityInfo.applicationInfo.isInstantApp()) {
final boolean isEphemeralApp = info.activityInfo.applicationInfo.isInstantApp(); // allow activities that have been explicitly exposed to ephemeral apps
if (!isEphemeralApp
&& ((info.activityInfo.flags & ActivityInfo.FLAG_VISIBLE_TO_INSTANT_APP) != 0)) {
continue; continue;
} }
resolveInfos.remove(i); resolveInfos.remove(i);