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

Commit 9aaa1146 authored by Sumedh Sen's avatar Sumedh Sen
Browse files

Update conditions for updates without user action for Android V

-For Android V, updates without user action are permitted for apps
targeting API 33+
-Updated the conditions for SDK version check in PackageInstallerSession and associated
documentation in PackageInstaller.SesionParams

Bug: 325888262
Test: atest CtsSilentUpdateHostTestCases
Change-Id: Idfe3af5ac5f3a29016634b1486f0a94f7892a445
parent 59cf6de3
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3465,8 +3465,12 @@ public class PackageInstaller {
         *              Android S  ({@link android.os.Build.VERSION_CODES#S API 31})</li>
         *              <li>{@link android.os.Build.VERSION_CODES#R API 30} or higher on
         *              Android T ({@link android.os.Build.VERSION_CODES#TIRAMISU API 33})</li>
         *              <li>{@link android.os.Build.VERSION_CODES#S API 31} or higher <b>after</b>
         *              Android T ({@link android.os.Build.VERSION_CODES#TIRAMISU API 33})</li>
         *              <li>{@link android.os.Build.VERSION_CODES#S API 31} or higher on
         *              Android U ({@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE API 34})
         *              </li>
         *              <li>{@link android.os.Build.VERSION_CODES#TIRAMISU API 33} or higher on
         *              Android V ({@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM API 35})
         *              </li>
         *          </ul>
         *     </li>
         *     <li>The installer is:
+4 −4
Original line number Diff line number Diff line
@@ -316,14 +316,14 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
    private static final int INCREMENTAL_STORAGE_UNHEALTHY_MONITORING_MS = 60000;

    /**
     * If an app being installed targets {@link Build.VERSION_CODES#S API 31} and above, the app
     * can be installed without user action.
     * If an app being installed targets {@link Build.VERSION_CODES#TIRAMISU API 33} and above,
     * the app can be installed without user action.
     * See {@link PackageInstaller.SessionParams#setRequireUserAction} for other conditions required
     * to be satisfied for a silent install.
     */
    @ChangeId
    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.S)
    private static final long SILENT_INSTALL_ALLOWED = 265131695L;
    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.TIRAMISU)
    private static final long SILENT_INSTALL_ALLOWED = 325888262L;

    /**
     * The system supports pre-approval and update ownership features from