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

Commit 9914f1c6 authored by Ricky Wai's avatar Ricky Wai Committed by Android (Google) Code Review
Browse files

Merge "Update PackageInstaller.setPackageSource() API docs." into tm-dev

parents c7df8de8 71312ff6
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -419,8 +419,8 @@ public class PackageInstaller {
    public @interface FileLocation{}

    /**
     * The installer did not call SessionParams#setPackageSource(int) to specify the package
     * source.
     * The installer did not call {@link PackageInstaller.SessionParams#setPackageSource(int)} to
     * specify the package source.
     */
    public static final int PACKAGE_SOURCE_UNSPECIFIED = 0;

@@ -444,8 +444,8 @@ public class PackageInstaller {

    /**
     * Code indicating that the package being installed comes from a file that was downloaded to
     * the device by the user. For use in place of PACKAGE_SOURCE_LOCAL_FILE when the installer
     * knows the package was downloaded.
     * the device by the user. For use in place of {@link #PACKAGE_SOURCE_LOCAL_FILE} when the
     * installer knows the package was downloaded.
     */
    public static final int PACKAGE_SOURCE_DOWNLOADED_FILE = 4;

@@ -1984,7 +1984,13 @@ public class PackageInstaller {
        }

        /**
         * Sets the apk package installation source.
         * Optionally indicate the package source of the app being installed. This is
         * informational and may be used as a signal by the system.
         *
         * An installer should specify {@link #PACKAGE_SOURCE_OTHER} if no other package source
         * constant adequately reflects the source for this session.
         *
         * The default value is {@link #PACKAGE_SOURCE_UNSPECIFIED}.
         */
        public void setPackageSource(@PackageSourceType int packageSource) {
            this.packageSource = packageSource;
@@ -2991,7 +2997,8 @@ public class PackageInstaller {
        }

        /**
         * Gets the apk package installation source.
         * Get the package source that was set in
         * {@link PackageInstaller.SessionParams#setPackageSource(int)}.
         */
        public @PackageSourceType int getPackageSource() {
            return packageSource;