commit | 4d3498955d4cb2529b2b0c455094b4605c343603 | [log] [tgz] |
---|---|---|
author | Ilyas Sung <ilyassung@google.com> | Mon Feb 13 15:57:48 2023 +0000 |
committer | Ilyas Sung <ilyassung@google.com> | Mon Feb 13 15:59:48 2023 +0000 |
tree | c262f878f32a4a5ed57fb17d0bcf27d50850bdc4 | |
parent | 4f69147f775aaac27a71acc32da642a46e1d1238 [diff] |
Added DevicePolicyEventLogger for method Set_Application_Exemptions Bug: 246330879 Test: atest ApplicationExemptionsTest Change-Id: I868d54d0f642b9b8f68e8a547ef1da110d48f0d9
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 90b7c12..d5ef926 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -18137,6 +18137,15 @@ } }); } + String[] appOpExemptions = new String[exemptions.length]; + for (int i = 0; i < exemptions.length; i++) { + appOpExemptions[i] = APPLICATION_EXEMPTION_CONSTANTS_TO_APP_OPS.get(exemptions[i]); + } + DevicePolicyEventLogger + .createEvent(DevicePolicyEnums.SET_APPLICATION_EXEMPTIONS) + .setAdmin(caller.getPackageName()) + .setStrings(packageName, appOpExemptions) + .write(); } @Override