diff options
| author | 2021-01-26 08:46:31 -0800 | |
|---|---|---|
| committer | 2021-03-15 16:15:35 +0000 | |
| commit | bcb5ee6f43ea24fb74649f164ca3c3032a7be3b5 (patch) | |
| tree | 19a9e1f5ca5756c2b6fefd20657ce3065888b1a1 | |
| parent | 1fcb030d0e8831def81e2e2c8ccfa4145b72ca96 (diff) | |
Don't crash if default supervision profile owner is not set
Bug: 175430552
Test: build, flash, watch logcat
Change-Id: If441946fa278c04ae88122f6243f5a7dedd96ebc
(cherry picked from commit bd27c365915f824824d865668c63a2119c4700fb)
| -rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 1a2eee06da4f..ac2281a2dbaa 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -8817,6 +8817,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return null; } final ComponentName supervisorComponent = ComponentName.unflattenFromString(supervisor); + if (supervisorComponent == null) { + return null; + } if (supervisorComponent.equals(doComponent) || supervisorComponent.equals( poComponent)) { return supervisorComponent; |