Skip to content
Commit de5182d2 authored by Alex Johnston's avatar Alex Johnston
Browse files

Refactor caller identity checks

* getCallerIdentity(who) and getCallerIdentity(packageName)
  can take in null, where getCallerIdentity() will be called.
* If componentName is null, isDeviceOwner(caller),
  isProfileOwner(caller) and isProfileOwnerOnOrgOwnedDevice(caller)
  cannot be called.
* Add missing null componentName checks

Bug: 168510294
Bug: 169029194
Bug: 168594327
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testScreenCaptureDisabled
      atest com.android.cts.devicepolicy.ManagedProfileWipeTest#testWipeDataWithReason
Change-Id: I1721ec3c1d18fb5be55cbec955d39686bbb9d268
parent a67c5344
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment