Extract privacy item monitoring interface, add AppOpsPrivacyItemMonitor
This is to allow privacy items that aren't driven by AppOps to be added. Changes include: - PrivacyConfig now holds the DeviceConfig listener. - Thread safety: currentUserId was previously accessed on multiple threads. All access to state of AppOpPrivacyItemMonitor is guarded by a lock. - Mic/camera PrivacyItems are now filtered out and not delivered to PrivacyItemController callbacks. Previously, changes to the location app op were ignored if locationAvailable was false - but changes to the mic/camera app op were still processed even if micCameraAvailable was false (and locationAvailable was true, as otherwise the AppOps callback was unregistered). PhoneStatusBarPolicy would log a mic/camera status bar icon is visible regardless of micCameraAvailable if locationAvailable was true - this will no longer be the case. Bug: 184629645 Test: atest CameraMicIndicatorsPermissionTest RecognitionServiceMicIndicatorTest Test: atest AppOpsPrivacyItemMonitorTest PrivacyItemControllerTest PrivacyConfigFlagsTest Test: m SystemUI CarSystemUI ArcSystemUI Test: Manual, observe mic/camera privacy indicators Change-Id: I3d78e35e1205e5ed8cc00eda71eed02f71fa35b4 Merged-In: I3d78e35e1205e5ed8cc00eda71eed02f71fa35b4
Loading
Please register or sign in to comment