diff options
| author | Tony Mak <tonymak@google.com> | 2018-02-12 17:52:34 +0000 |
|---|---|---|
| committer | Tony Mak <tonymak@google.com> | 2018-02-20 15:07:01 +0000 |
| commit | 366ee6269d4f35dadb475ae63a46c8b3066f9d62 (patch) | |
| tree | 55279674d2f2581695c2425c8a36d9ba39e1ce1e /core/java | |
| parent | bfd30802f7276fdfb75b8704544d0b805ad4fe5d (diff) | |
Update javadoc of PackageInstaller to mention the enterprise bit
FIX: 70377922
Change-Id: I87fb995ff476448511076077ba99b1fe3d79b819
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/content/pm/PackageInstaller.java | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java index d0be6c854020..25af1a76700f 100644 --- a/core/java/android/content/pm/PackageInstaller.java +++ b/core/java/android/content/pm/PackageInstaller.java @@ -448,11 +448,17 @@ public class PackageInstaller { /** * Uninstall the given package, removing it completely from the device. This - * method is only available to the current "installer of record" for the - * package. + * method is available to: + * <ul> + * <li>the current "installer of record" for the package + * <li>the device owner + * <li>the affiliated profile owner + * </ul> * * @param packageName The package to uninstall. * @param statusReceiver Where to deliver the result. + * + * @see android.app.admin.DevicePolicyManager */ @RequiresPermission(anyOf = { Manifest.permission.DELETE_PACKAGES, @@ -480,14 +486,22 @@ public class PackageInstaller { /** * Uninstall the given package with a specific version code, removing it - * completely from the device. This method is only available to the current - * "installer of record" for the package. If the version code of the package + * completely from the device. If the version code of the package * does not match the one passed in the versioned package argument this * method is a no-op. Use {@link PackageManager#VERSION_CODE_HIGHEST} to * uninstall the latest version of the package. + * <p> + * This method is available to: + * <ul> + * <li>the current "installer of record" for the package + * <li>the device owner + * <li>the affiliated profile owner + * </ul> * * @param versionedPackage The versioned package to uninstall. * @param statusReceiver Where to deliver the result. + * + * @see android.app.admin.DevicePolicyManager */ @RequiresPermission(anyOf = { Manifest.permission.DELETE_PACKAGES, @@ -941,9 +955,14 @@ public class PackageInstaller { * Once this method is called, the session is sealed and no additional * mutations may be performed on the session. If the device reboots * before the session has been finalized, you may commit the session again. + * <p> + * If the installer is the device owner or the affiliated profile owner, there will be no + * user intervention. * * @throws SecurityException if streams opened through * {@link #openWrite(String, long, long)} are still open. + * + * @see android.app.admin.DevicePolicyManager */ public void commit(@NonNull IntentSender statusReceiver) { try { |
