From 0cefec2d4f766082a653bd45bfb1e64b2ed8ffb1 Mon Sep 17 00:00:00 2001 From: Evan Severson Date: Wed, 6 Oct 2021 08:28:51 -0700 Subject: Refactor SensorPrivacyService to separate state from service This refactoring will let us have alternative implementations for the state of microphone/camera. It also seperates the storage of the other feature that is known as the "Sensor mute" so that the reuse of this service doesn't get too convoluted. Also extract the persitable state from the state implementation so that alternative implementations can resuse the persistence code. Some smaller changes: * Start the sensor use dailog as user 0 always since system UI requires user 0 * Use SystemClock.elapsedRealTime() instead of network time since it's guaranteed to my monotonic. This will also change that intervals used in telemetry aren't going to measure time the device is powered off. Ignore-AOSP-First: New OWNERS file Test: atest CtsSensorPrivacyTestCases SensorPrivacyServiceMockingTest Bug: 200649586 Change-Id: I4c23c2509d7d1bdf49360fc9bbadb79ccd451dcc --- services/java/com/android/server/SystemServer.java | 1 + 1 file changed, 1 insertion(+) (limited to 'services/java/com') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index fe5c358bc5c1..4db2b9cc4a62 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -181,6 +181,7 @@ import com.android.server.security.AttestationVerificationManagerService; import com.android.server.security.FileIntegrityService; import com.android.server.security.KeyAttestationApplicationIdProviderService; import com.android.server.security.KeyChainSystemService; +import com.android.server.sensorprivacy.SensorPrivacyService; import com.android.server.sensors.SensorService; import com.android.server.signedconfig.SignedConfigService; import com.android.server.soundtrigger.SoundTriggerService; -- cgit v1.2.3-59-g8ed1b