Loading
Fix DevicePolicyManager.isBackupServiceEnabled() breakage.
http://ag/12885739 introduced a enforceCallingPermission(BACKUP) check but callers of this API do not hold that permission. This CL fixes this by changing the check to enforceCallingOrSelfPermission(BACKUP), and clearing the binder identity in DevicePolicyManagerService, which makes the system server process the owner of that call. Bug: 158482162 Bug: 172466964 Test: atest com.android.cts.devicepolicy.{Device,Profile}OwnerTest#testBackupServiceEnabling Change-Id: I11d863229c4d62a058aaf37446a694b9c73ae5b8