Merge "Check printing restriction for correct user."
This commit is contained in:
committed by
Android (Google) Code Review
commit
0ec75beab7
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user