Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfa3bbaa authored by Elis Elliott's avatar Elis Elliott
Browse files

Re-add ComponentName null check for setOrganisationName.

For the legacy-code only.

Fixes: 269138919

Test: atest com.android.cts.devicepolicy.ManagedProfileTest#testOrganizationInfo
Change-Id: Ic033cb5820d48135c926316e9672f301eb3185a8
parent 7766ef11
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -17324,6 +17324,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                    caller.getUserId());
            admin = enforcingAdmin.getActiveAdmin();
        } else {
            Objects.requireNonNull(who, "ComponentName is null");
            Preconditions.checkCallAuthorization(isDeviceOwner(caller) || isProfileOwner(caller));
        }
@@ -17355,6 +17356,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                    caller.getUserId());
            admin = enforcingAdmin.getActiveAdmin();
        } else {
            Objects.requireNonNull(who, "ComponentName is null");
            Preconditions.checkCallingUser(isManagedProfile(caller.getUserId()));
            Preconditions.checkCallAuthorization(isDeviceOwner(caller) || isProfileOwner(caller));