Skip to content

Commit f4e5884

Browse files
Tomasz WasilczykRafiester
authored andcommitted
Don't crash if default supervision profile owner is not set
Bug: 175430552 Bug: 197399948 Test: build, flash, watch logcat Change-Id: If441946fa278c04ae88122f6243f5a7dedd96ebc Merged-In: If441946fa278c04ae88122f6243f5a7dedd96ebc (cherry picked from commit bd27c36) (cherry picked from commit bcb5ee6) (cherry picked from commit b5fa0a6) Merged-In:If441946fa278c04ae88122f6243f5a7dedd96ebc
1 parent a3b2c10 commit f4e5884

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9424,6 +9424,9 @@ && isProfileOwnerOfOrganizationOwnedDevice(userInfo.id)) {
94249424
final ComponentName doComponent = mOwners.getDeviceOwnerComponent();
94259425
final ComponentName poComponent =
94269426
mOwners.getProfileOwnerComponent(userHandle.getIdentifier());
9427+
if (supervisorComponent == null) {
9428+
return null;
9429+
}
94279430
if (supervisorComponent.equals(doComponent) || supervisorComponent.equals(
94289431
poComponent)) {
94299432
return supervisorComponent;

0 commit comments

Comments
 (0)