commit | 244b2b588c6a2f434ceede6d10c6abeb3a387802 | [log] [tgz] |
---|---|---|
author | Andy Hung <hunga@google.com> | Tue Jan 03 16:12:50 2023 -0800 |
committer | Mikhail Naganov <mnaganov@google.com> | Thu May 04 12:15:08 2023 -0700 |
tree | a8b5abb167a12771d18e619d597175846f29cf65 | |
parent | 58e1c4e23a6a33a7b41635b17046617e81927b81 [diff] |
audioserver: Initialize services before making public. This avoids inconsistencies and TimeCheck aborts when the AudioFlinger interface is made public before AudioPolicy is initialized. Test: boot, check logcat, kill audioserver, check logcat Bug: 240234432 Bug: 262821105 Merged-In: I2259105eb86110fafe4e3d7ba5820f6557382447 Change-Id: I2259105eb86110fafe4e3d7ba5820f6557382447 (cherry picked from commit 1d312b975483e6fc4f4b50c09707c49b60b19414)
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 9079be9..769a997 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h
@@ -131,6 +131,7 @@ class AudioFlinger : public AudioFlingerServerAdapter::Delegate { + friend class sp<AudioFlinger>; public: static void instantiate() ANDROID_API;
diff --git a/services/audiopolicy/service/AudioPolicyService.h b/services/audiopolicy/service/AudioPolicyService.h index 7f682c8..a9eff19 100644 --- a/services/audiopolicy/service/AudioPolicyService.h +++ b/services/audiopolicy/service/AudioPolicyService.h
@@ -69,7 +69,7 @@ public IBinder::DeathRecipient, public SpatializerPolicyCallback { - friend class BinderService<AudioPolicyService>; + friend class sp<AudioPolicyService>; public: // for BinderService