Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45ae5b15 authored by Sumedh Sen's avatar Sumedh Sen
Browse files

Merge "Update conditions for updates without user action for Android T" into tm-dev

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17229915

Merged-In: Iafd03b75ecf246a9651572becf6158316ecd8100
Change-Id: Iafd03b75ecf246a9651572becf6158316ecd8100
parent baa08295
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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>
+2 −2
Original line number Diff line number Diff line
@@ -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;
            }