commit | d47259a203a4569ffaa88adf2449ee4beacbc856 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Fri Jan 11 16:50:04 2019 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Fri Jan 11 16:50:04 2019 +0000 |
tree | 7681aebe7306f2cf79342007c9d73eefbf6dcd36 | |
parent | d3dda315c3a2eaebd66ddd9f91c9d92bcd7a05fe [diff] | |
parent | 417601034da4aaaae4b1621f4aa223cdd6703231 [diff] |
Merge "Do not emit WTF if there is no delegate"
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 0e05b5a..76ae5cc 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -6103,7 +6103,9 @@ synchronized (getLockObject()) { delegates = getDelegatePackagesInternalLocked(scope, userId); } - if (delegates.size() != 1) { + if (delegates.size() == 0) { + return null; + } else if (delegates.size() > 1) { Slog.wtf(LOG_TAG, "More than one delegate holds " + scope); return null; }