Add phone call check to app opp usage callback.

This fixes issue where calls are not included inside privacy items in AAOS.

Bug: 186518774
Test: Manual
Change-Id: Ie7b057c5af21b5fb1c51f6f9a4067c85b9ea373b
This commit is contained in:
Abhijoy Saha
2021-04-29 20:16:41 +00:00
parent c03a2d303d
commit 381edd74d4

View File

@@ -151,7 +151,9 @@ class PrivacyItemController @Inject constructor(
return
}
val userId = UserHandle.getUserId(uid)
if (userId in currentUserIds) {
if (userId in currentUserIds ||
code == AppOpsManager.OP_PHONE_CALL_MICROPHONE ||
code == AppOpsManager.OP_PHONE_CALL_CAMERA) {
logger.logUpdatedItemFromAppOps(code, uid, packageName, active)
update(false)
}