diff options
author | Rubin Xu <rubinxu@google.com> | 2015-03-10 10:51:59 +0000 |
---|---|---|
committer | Rubin Xu <rubinxu@google.com> | 2015-03-10 12:22:16 +0000 |
commit | e1e6faad7b212d4042e74ca94f5428a346528ac0 (patch) | |
tree | 8f576025e566dcd5fe08f75aba668666ad40177b /core | |
parent | 727899fd0d6fe0de81bb329280e21b5152a1ae52 (diff) | |
download | frameworks_base-e1e6faad7b212d4042e74ca94f5428a346528ac0.zip frameworks_base-e1e6faad7b212d4042e74ca94f5428a346528ac0.tar.gz frameworks_base-e1e6faad7b212d4042e74ca94f5428a346528ac0.tar.bz2 |
Document behavior change of isUninstallBlocked() since L MR1
Bug: 17914630
Change-Id: I39ee2775c104e4dca7ca583b83deef0aa0e4d1e3
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 337bac5..a995835 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -3495,9 +3495,14 @@ public class DevicePolicyManager { /** * Check whether the current user has been blocked by device policy from uninstalling a package. * Requires the caller to be the profile owner if checking a specific admin's policy. + * <p> + * <strong>Note:</strong> Starting from {@link android.os.Build.VERSION_CODES#LOLLIPOP_MR1}, the + * behavior of this API is changed such that passing <code>null</code> as the <code>admin</code> + * parameter will return if any admin has blocked the uninstallation. Before L MR1, passing + * <code>null</code> will cause a NullPointerException to be raised. * * @param admin The name of the admin component whose blocking policy will be checked, or null - * to check if any admin has blocked the uninstallation. + * to check if any admin has blocked the uninstallation. * @param packageName package to check. * @return true if uninstallation is blocked. */ |