AudioFlinger: Use callback to get screen state
Avoid using a static member to get access without
a shared pointer.
Test: atest AudioRecordTest AudioTrackTest
Test: Camera YouTube
Bug: 292018229
Change-Id: I17228618a61b626e8f530a3a1946fbe9a7893fd4
diff --git a/services/audioflinger/IAfThread.h b/services/audioflinger/IAfThread.h
index 1566cac..235378b 100644
--- a/services/audioflinger/IAfThread.h
+++ b/services/audioflinger/IAfThread.h
@@ -72,6 +72,7 @@
virtual audio_mode_t getMode() const = 0;
virtual bool isLowRamDevice() const = 0;
virtual bool isAudioPolicyReady() const = 0; // Effects
+ virtual uint32_t getScreenState() const = 0;
virtual std::optional<media::AudioVibratorInfo> getDefaultVibratorInfo_l() const = 0;
virtual const sp<IAfPatchPanel>& getPatchPanel() const = 0;
virtual const sp<MelReporter>& getMelReporter() const = 0;