diff options
author | 2024-08-13 16:09:09 +0000 | |
---|---|---|
committer | 2024-08-13 16:09:09 +0000 | |
commit | 6b409d9315991375f9de628ee9199d9e7009fccc (patch) | |
tree | 41f41a0f9ed253a6845661aee02bdf76940f33d6 | |
parent | 2438ba5c7ee59787651c9fd94d9630e321339986 (diff) | |
parent | 1e2adecdf9a206f849e7b0ba2192830717c6b792 (diff) |
Merge "Fix NPE due to a null package name of system enforcing admin." into main
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/EnforcingAdmin.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/EnforcingAdmin.java b/services/devicepolicy/java/com/android/server/devicepolicy/EnforcingAdmin.java index e65e513af55c..634f1bc97772 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/EnforcingAdmin.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/EnforcingAdmin.java @@ -203,7 +203,8 @@ final class EnforcingAdmin { // Only system authorities use this constructor. mIsSystemAuthority = true; mIsRoleAuthority = false; - mPackageName = null; + // Package name is not used for a system enforcing admin, so an empty string is fine. + mPackageName = ""; mSystemEntity = systemEntity; mUserId = UserHandle.USER_SYSTEM; mComponentName = null; |