summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorVladislav Kuzkokov <vkuzkokov@google.com>2018-01-22 19:16:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-01-22 19:16:48 +0000
commitea4e107ada0bb95039b493a2a95d6f0840c52585 (patch)
treec83e50961277dbc6fe44954b2ee3740a16b3f274 /core/java/android
parent0e5f9c8a4b327a818ead467f3f3df1ca1e4af1ab (diff)
parent635ea803320be8692b495c7bee6e7872c551fc1b (diff)
Merge "Unhide printing policy API."
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index d465e0df6406..7fccda8c04e3 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -9210,10 +9210,13 @@ public class DevicePolicyManager {
/**
* Allows/disallows printing.
*
+ * Called by a device owner or a profile owner.
+ * Device owner changes policy for all users. Profile owner can override it if present.
+ * Printing is enabled by default. If {@code FEATURE_PRINTING} is absent, the call is ignored.
+ *
* @param admin which {@link DeviceAdminReceiver} this request is associated with.
* @param enabled whether printing should be allowed or not.
* @throws SecurityException if {@code admin} is neither device, nor profile owner.
- * @hide
*/
public void setPrintingEnabled(@NonNull ComponentName admin, boolean enabled) {
try {
@@ -9224,10 +9227,12 @@ public class DevicePolicyManager {
}
/**
- * Returns whether printing is enabled for current user.
+ * Returns whether printing is enabled for this user.
+ *
+ * Always {@code false} if {@code FEATURE_PRINTING} is absent.
+ * Otherwise, {@code true} by default.
*
* @return {@code true} iff printing is enabled.
- * @hide
*/
public boolean isPrintingEnabled() {
try {
@@ -9242,9 +9247,9 @@ public class DevicePolicyManager {
*
* Used only by PrintService.
* @return Localized error message.
- * @throws SecurityException if caller is not system.
* @hide
*/
+ @SystemApi
public CharSequence getPrintingDisabledReason() {
try {
return mService.getPrintingDisabledReason();