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

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

Merge "Check printing restriction for correct user."

parents 4993e552 bc630497
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10419,7 +10419,8 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        public CharSequence getPrintingDisabledReasonForUser(@UserIdInt int userId) {
            synchronized (DevicePolicyManagerService.this) {
                DevicePolicyData policy = getUserData(userId);
                if (!mUserManager.hasUserRestriction(UserManager.DISALLOW_PRINTING)) {
                if (!mUserManager.hasUserRestriction(UserManager.DISALLOW_PRINTING,
                        UserHandle.of(userId))) {
                    Log.e(LOG_TAG, "printing is enabled");
                    return null;
                }
+2 −1
Original line number Diff line number Diff line
@@ -718,7 +718,8 @@ public final class PrintManagerService extends SystemService {
        }

        private boolean isPrintingEnabled() {
            return !mUserManager.hasUserRestriction(UserManager.DISALLOW_PRINTING);
            return !mUserManager.hasUserRestriction(UserManager.DISALLOW_PRINTING,
                    Binder.getCallingUserHandle());
        }

        private void dump(@NonNull DualDumpOutputStream dumpStream,