diff options
| -rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 32781a90348b..3fc2d3712fed 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -855,8 +855,7 @@ public class AudioService extends IAudioService.Stub public void onSystemReady() { mSystemReady = true; - sendMsg(mAudioHandler, MSG_LOAD_SOUND_EFFECTS, SENDMSG_QUEUE, - 0, 0, null, 0); + scheduleLoadSoundEffects(); mDeviceBroker.onSystemReady(); @@ -3225,6 +3224,14 @@ public class AudioService extends IAudioService.Stub } /** + * Schedule loading samples into the soundpool. + * This method can be overridden to schedule loading at a later time. + */ + protected void scheduleLoadSoundEffects() { + sendMsg(mAudioHandler, MSG_LOAD_SOUND_EFFECTS, SENDMSG_QUEUE, 0, 0, null, 0); + } + + /** * Unloads samples from the sound pool. * This method can be called to free some memory when * sound effects are disabled. |