diff options
| author | 2017-04-18 14:39:23 +0200 | |
|---|---|---|
| committer | 2017-05-03 15:17:36 +0200 | |
| commit | 40a006285b954607a96b1209de95bbed48d856f7 (patch) | |
| tree | f00b074ac7bd37fee90be46b2238e7e351451ad2 | |
| parent | b9ee2d4677aa48045a770a899661f96053e66926 (diff) | |
Add more explicit documentation for install reason
This CL adds more explicit documentation of the install reason argument /
return value to PackageInstaller.SessionInfo.
Bug: 37324584
Test: None
Change-Id: I2450cc669b194e611c5dc07c6a0a5cd78a98c039
| -rw-r--r-- | core/java/android/content/pm/PackageInstaller.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java index aaaff0c059db..4e112331a1ed 100644 --- a/core/java/android/content/pm/PackageInstaller.java +++ b/core/java/android/content/pm/PackageInstaller.java @@ -26,6 +26,7 @@ import android.annotation.SystemApi; import android.app.ActivityManager; import android.content.Intent; import android.content.IntentSender; +import android.content.pm.PackageManager.InstallReason; import android.graphics.Bitmap; import android.net.Uri; import android.os.FileBridge; @@ -948,7 +949,7 @@ public class PackageInstaller { /** {@hide} */ public int installLocation = PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY; /** {@hide} */ - public int installReason = PackageManager.INSTALL_REASON_UNKNOWN; + public @InstallReason int installReason = PackageManager.INSTALL_REASON_UNKNOWN; /** {@hide} */ public long sizeBytes = -1; /** {@hide} */ @@ -1146,7 +1147,10 @@ public class PackageInstaller { } } - public void setInstallReason(int installReason) { + /** + * Set the reason for installing this package. + */ + public void setInstallReason(@InstallReason int installReason) { this.installReason = installReason; } @@ -1236,7 +1240,7 @@ public class PackageInstaller { /** {@hide} */ public int mode; /** {@hide} */ - public int installReason; + public @InstallReason int installReason; /** {@hide} */ public long sizeBytes; /** {@hide} */ @@ -1324,9 +1328,9 @@ public class PackageInstaller { /** * Return the reason for installing this package. * - * @see PackageManager#INSTALL_REASON_UNKNOWN + * @return The install reason. */ - public int getInstallReason() { + public @InstallReason int getInstallReason() { return installReason; } |