Loading core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -13079,6 +13079,7 @@ package android.content.pm { method public boolean hasParentSessionId(); method public boolean isActive(); method public boolean isApplicationEnabledSettingPersistent(); method @FlaggedApi("android.content.pm.sdk_dependency_installer") public boolean isAutoInstallDependenciesEnabled(); method public boolean isCommitted(); method public boolean isMultiPackage(); method public boolean isPreApprovalRequested(); Loading Loading @@ -13114,6 +13115,7 @@ package android.content.pm { method public void setApplicationEnabledSettingPersistent(); method @Deprecated public void setAutoRevokePermissionsMode(boolean); method public void setDontKillApp(boolean); method @FlaggedApi("android.content.pm.sdk_dependency_installer") public void setEnableAutoInstallDependencies(boolean); method public void setInstallLocation(int); method public void setInstallReason(int); method public void setInstallScenario(int); core/java/android/content/pm/PackageInstaller.java +38 −0 Original line number Diff line number Diff line Loading @@ -2936,6 +2936,8 @@ public class PackageInstaller { public @Nullable String dexoptCompilerFilter = null; /** {@hide} */ public boolean forceVerification; /** {@hide} */ public boolean isAutoInstallDependenciesEnabled = true; private final ArrayMap<String, Integer> mPermissionStates; Loading Loading @@ -2991,6 +2993,7 @@ public class PackageInstaller { unarchiveId = source.readInt(); dexoptCompilerFilter = source.readString(); forceVerification = source.readBoolean(); isAutoInstallDependenciesEnabled = source.readBoolean(); } /** {@hide} */ Loading Loading @@ -3028,6 +3031,7 @@ public class PackageInstaller { ret.unarchiveId = unarchiveId; ret.dexoptCompilerFilter = dexoptCompilerFilter; ret.forceVerification = forceVerification; ret.isAutoInstallDependenciesEnabled = isAutoInstallDependenciesEnabled; return ret; } Loading Loading @@ -3744,6 +3748,23 @@ public class PackageInstaller { this.forceVerification = true; } /** * Optionally indicate whether missing SDK or static shared library dependencies should be * automatically fetched and installed when installing an app that wants to use these * dependencies. * * <p> This feature is enabled by default. * * @param enableAutoInstallDependencies {@code true} to enable auto-installation of missing * SDK or static shared library dependencies, * {@code false} to disable and fail immediately if * dependencies aren't already installed. */ @FlaggedApi(Flags.FLAG_SDK_DEPENDENCY_INSTALLER) public void setEnableAutoInstallDependencies(boolean enableAutoInstallDependencies) { isAutoInstallDependenciesEnabled = enableAutoInstallDependencies; } /** {@hide} */ public void dump(IndentingPrintWriter pw) { pw.printPair("mode", mode); Loading Loading @@ -3780,6 +3801,7 @@ public class PackageInstaller { pw.printPair("unarchiveId", unarchiveId); pw.printPair("dexoptCompilerFilter", dexoptCompilerFilter); pw.printPair("forceVerification", forceVerification); pw.printPair("isAutoInstallDependenciesEnabled", isAutoInstallDependenciesEnabled); pw.println(); } Loading Loading @@ -3827,6 +3849,7 @@ public class PackageInstaller { dest.writeInt(unarchiveId); dest.writeString(dexoptCompilerFilter); dest.writeBoolean(forceVerification); dest.writeBoolean(isAutoInstallDependenciesEnabled); } public static final Parcelable.Creator<SessionParams> Loading Loading @@ -4004,6 +4027,9 @@ public class PackageInstaller { private int mSessionErrorCode; private String mSessionErrorMessage; /** {@hide} */ public boolean isAutoInstallingDependenciesEnabled; /** {@hide} */ public boolean isCommitted; Loading Loading @@ -4097,6 +4123,7 @@ public class PackageInstaller { packageSource = source.readInt(); applicationEnabledSettingPersistent = source.readBoolean(); pendingUserActionReason = source.readInt(); isAutoInstallingDependenciesEnabled = source.readBoolean(); } /** Loading Loading @@ -4681,6 +4708,16 @@ public class PackageInstaller { return (installFlags & PackageManager.INSTALL_UNARCHIVE) != 0; } /** * Check whether missing SDK or static shared library dependencies should be automatically * fetched and installed when installing an app that wants to use these dependencies. * * @return true if the dependencies will be auto-installed, false otherwise. */ @FlaggedApi(Flags.FLAG_SDK_DEPENDENCY_INSTALLER) public boolean isAutoInstallDependenciesEnabled() { return isAutoInstallingDependenciesEnabled; } @Override public int describeContents() { Loading Loading @@ -4735,6 +4772,7 @@ public class PackageInstaller { dest.writeInt(packageSource); dest.writeBoolean(applicationEnabledSettingPersistent); dest.writeInt(pendingUserActionReason); dest.writeBoolean(isAutoInstallingDependenciesEnabled); } public static final Parcelable.Creator<SessionInfo> Loading core/java/android/content/pm/flags.aconfig +1 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,7 @@ flag { flag { name: "sdk_dependency_installer" is_exported: true namespace: "package_manager_service" description: "Feature flag to enable installation of missing sdk dependency of app" bug: "370822870" Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +4 −1 Original line number Diff line number Diff line Loading @@ -1429,6 +1429,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { info.packageSource = params.packageSource; info.applicationEnabledSettingPersistent = params.applicationEnabledSettingPersistent; info.pendingUserActionReason = userActionRequirementToReason(mUserActionRequirement); info.isAutoInstallingDependenciesEnabled = params.isAutoInstallDependenciesEnabled; } return info; } Loading Loading @@ -3415,7 +3416,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { return; } if (Flags.sdkDependencyInstaller() && !isMultiPackage()) { if (Flags.sdkDependencyInstaller() && params.isAutoInstallDependenciesEnabled && !isMultiPackage()) { resolveLibraryDependenciesIfNeeded(); } else { install(); Loading Loading
core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -13079,6 +13079,7 @@ package android.content.pm { method public boolean hasParentSessionId(); method public boolean isActive(); method public boolean isApplicationEnabledSettingPersistent(); method @FlaggedApi("android.content.pm.sdk_dependency_installer") public boolean isAutoInstallDependenciesEnabled(); method public boolean isCommitted(); method public boolean isMultiPackage(); method public boolean isPreApprovalRequested(); Loading Loading @@ -13114,6 +13115,7 @@ package android.content.pm { method public void setApplicationEnabledSettingPersistent(); method @Deprecated public void setAutoRevokePermissionsMode(boolean); method public void setDontKillApp(boolean); method @FlaggedApi("android.content.pm.sdk_dependency_installer") public void setEnableAutoInstallDependencies(boolean); method public void setInstallLocation(int); method public void setInstallReason(int); method public void setInstallScenario(int);
core/java/android/content/pm/PackageInstaller.java +38 −0 Original line number Diff line number Diff line Loading @@ -2936,6 +2936,8 @@ public class PackageInstaller { public @Nullable String dexoptCompilerFilter = null; /** {@hide} */ public boolean forceVerification; /** {@hide} */ public boolean isAutoInstallDependenciesEnabled = true; private final ArrayMap<String, Integer> mPermissionStates; Loading Loading @@ -2991,6 +2993,7 @@ public class PackageInstaller { unarchiveId = source.readInt(); dexoptCompilerFilter = source.readString(); forceVerification = source.readBoolean(); isAutoInstallDependenciesEnabled = source.readBoolean(); } /** {@hide} */ Loading Loading @@ -3028,6 +3031,7 @@ public class PackageInstaller { ret.unarchiveId = unarchiveId; ret.dexoptCompilerFilter = dexoptCompilerFilter; ret.forceVerification = forceVerification; ret.isAutoInstallDependenciesEnabled = isAutoInstallDependenciesEnabled; return ret; } Loading Loading @@ -3744,6 +3748,23 @@ public class PackageInstaller { this.forceVerification = true; } /** * Optionally indicate whether missing SDK or static shared library dependencies should be * automatically fetched and installed when installing an app that wants to use these * dependencies. * * <p> This feature is enabled by default. * * @param enableAutoInstallDependencies {@code true} to enable auto-installation of missing * SDK or static shared library dependencies, * {@code false} to disable and fail immediately if * dependencies aren't already installed. */ @FlaggedApi(Flags.FLAG_SDK_DEPENDENCY_INSTALLER) public void setEnableAutoInstallDependencies(boolean enableAutoInstallDependencies) { isAutoInstallDependenciesEnabled = enableAutoInstallDependencies; } /** {@hide} */ public void dump(IndentingPrintWriter pw) { pw.printPair("mode", mode); Loading Loading @@ -3780,6 +3801,7 @@ public class PackageInstaller { pw.printPair("unarchiveId", unarchiveId); pw.printPair("dexoptCompilerFilter", dexoptCompilerFilter); pw.printPair("forceVerification", forceVerification); pw.printPair("isAutoInstallDependenciesEnabled", isAutoInstallDependenciesEnabled); pw.println(); } Loading Loading @@ -3827,6 +3849,7 @@ public class PackageInstaller { dest.writeInt(unarchiveId); dest.writeString(dexoptCompilerFilter); dest.writeBoolean(forceVerification); dest.writeBoolean(isAutoInstallDependenciesEnabled); } public static final Parcelable.Creator<SessionParams> Loading Loading @@ -4004,6 +4027,9 @@ public class PackageInstaller { private int mSessionErrorCode; private String mSessionErrorMessage; /** {@hide} */ public boolean isAutoInstallingDependenciesEnabled; /** {@hide} */ public boolean isCommitted; Loading Loading @@ -4097,6 +4123,7 @@ public class PackageInstaller { packageSource = source.readInt(); applicationEnabledSettingPersistent = source.readBoolean(); pendingUserActionReason = source.readInt(); isAutoInstallingDependenciesEnabled = source.readBoolean(); } /** Loading Loading @@ -4681,6 +4708,16 @@ public class PackageInstaller { return (installFlags & PackageManager.INSTALL_UNARCHIVE) != 0; } /** * Check whether missing SDK or static shared library dependencies should be automatically * fetched and installed when installing an app that wants to use these dependencies. * * @return true if the dependencies will be auto-installed, false otherwise. */ @FlaggedApi(Flags.FLAG_SDK_DEPENDENCY_INSTALLER) public boolean isAutoInstallDependenciesEnabled() { return isAutoInstallingDependenciesEnabled; } @Override public int describeContents() { Loading Loading @@ -4735,6 +4772,7 @@ public class PackageInstaller { dest.writeInt(packageSource); dest.writeBoolean(applicationEnabledSettingPersistent); dest.writeInt(pendingUserActionReason); dest.writeBoolean(isAutoInstallingDependenciesEnabled); } public static final Parcelable.Creator<SessionInfo> Loading
core/java/android/content/pm/flags.aconfig +1 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,7 @@ flag { flag { name: "sdk_dependency_installer" is_exported: true namespace: "package_manager_service" description: "Feature flag to enable installation of missing sdk dependency of app" bug: "370822870" Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +4 −1 Original line number Diff line number Diff line Loading @@ -1429,6 +1429,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { info.packageSource = params.packageSource; info.applicationEnabledSettingPersistent = params.applicationEnabledSettingPersistent; info.pendingUserActionReason = userActionRequirementToReason(mUserActionRequirement); info.isAutoInstallingDependenciesEnabled = params.isAutoInstallDependenciesEnabled; } return info; } Loading Loading @@ -3415,7 +3416,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { return; } if (Flags.sdkDependencyInstaller() && !isMultiPackage()) { if (Flags.sdkDependencyInstaller() && params.isAutoInstallDependenciesEnabled && !isMultiPackage()) { resolveLibraryDependenciesIfNeeded(); } else { install(); Loading