Merge "Merge "Update conditions for updates without user action for Android T" into tm-dev" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
83f718f8ac
@@ -2308,8 +2308,14 @@ public class PackageInstaller {
|
||||
*
|
||||
* <ul>
|
||||
* <li>{@code requireUserAction} is set to {@link #USER_ACTION_NOT_REQUIRED}.</li>
|
||||
* <li>The app being installed targets {@link android.os.Build.VERSION_CODES#Q API 29}
|
||||
* or higher.</li>
|
||||
* <li>The app being installed targets:
|
||||
* <ul>
|
||||
* <li>{@link android.os.Build.VERSION_CODES#Q API 29} or higher on
|
||||
* Android S ({@link android.os.Build.VERSION_CODES#S API 31})</li>
|
||||
* <li>{@link android.os.Build.VERSION_CODES#R API 30} or higher after
|
||||
* Android S ({@link android.os.Build.VERSION_CODES#S API 31})</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>The installer is the {@link InstallSourceInfo#getInstallingPackageName()
|
||||
* installer of record} of an existing version of the app (in other words, this install
|
||||
* session is an app update) or the installer is updating itself.</li>
|
||||
|
||||
@@ -272,7 +272,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
|
||||
/**
|
||||
* The default value of {@link #mValidatedTargetSdk} is {@link Integer#MAX_VALUE}. If {@link
|
||||
* #mValidatedTargetSdk} is compared with {@link Build.VERSION_CODES#Q} before getting the
|
||||
* #mValidatedTargetSdk} is compared with {@link Build.VERSION_CODES#R} before getting the
|
||||
* target sdk version from a validated apk in {@link #validateApkInstallLocked()}, the compared
|
||||
* result will not trigger any user action in
|
||||
* {@link #checkUserActionRequirement(PackageInstallerSession)}.
|
||||
@@ -2083,7 +2083,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
}
|
||||
|
||||
if (validatedTargetSdk != INVALID_TARGET_SDK_VERSION
|
||||
&& validatedTargetSdk < Build.VERSION_CODES.Q) {
|
||||
&& validatedTargetSdk < Build.VERSION_CODES.R) {
|
||||
session.sendPendingUserActionIntent(target);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user