Skip to content
Commit 3a89e626 authored by Robert Horvath's avatar Robert Horvath
Browse files

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
parent 9568bd96
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