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

Commit ea4e107a authored by Vladislav Kuzkokov's avatar Vladislav Kuzkokov Committed by Android (Google) Code Review
Browse files

Merge "Unhide printing policy API."

parents 0e5f9c8a 635ea803
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6474,6 +6474,7 @@ package android.app.admin {
    method public boolean isMasterVolumeMuted(android.content.ComponentName);
    method public boolean isNetworkLoggingEnabled(android.content.ComponentName);
    method public boolean isPackageSuspended(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public boolean isPrintingEnabled();
    method public boolean isProfileOwnerApp(java.lang.String);
    method public boolean isProvisioningAllowed(java.lang.String);
    method public boolean isResetPasswordTokenActive(android.content.ComponentName);
@@ -6543,6 +6544,7 @@ package android.app.admin {
    method public boolean setPermittedAccessibilityServices(android.content.ComponentName, java.util.List<java.lang.String>);
    method public boolean setPermittedCrossProfileNotificationListeners(android.content.ComponentName, java.util.List<java.lang.String>);
    method public boolean setPermittedInputMethods(android.content.ComponentName, java.util.List<java.lang.String>);
    method public void setPrintingEnabled(android.content.ComponentName, boolean);
    method public void setProfileEnabled(android.content.ComponentName);
    method public void setProfileName(android.content.ComponentName, java.lang.String);
    method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
+1 −0
Original line number Diff line number Diff line
@@ -380,6 +380,7 @@ package android.app.admin {
    method public java.lang.CharSequence getDeviceOwnerOrganizationName();
    method public java.util.List<java.lang.String> getPermittedAccessibilityServices(int);
    method public java.util.List<java.lang.String> getPermittedInputMethodsForCurrentUser();
    method public java.lang.CharSequence getPrintingDisabledReason();
    method public android.content.ComponentName getProfileOwner() throws java.lang.IllegalArgumentException;
    method public java.lang.String getProfileOwnerNameAsUser(int) throws java.lang.IllegalArgumentException;
    method public int getUserProvisioningState();
+9 −4
Original line number Diff line number Diff line
@@ -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();