diff options
| author | 2019-09-09 17:47:31 -0700 | |
|---|---|---|
| committer | 2019-09-09 17:50:07 -0700 | |
| commit | fc23ee64533a94b5158125428f2fa6670a9de23b (patch) | |
| tree | f10e5a678c99cf7be6f45ce6a89626650100646a | |
| parent | e1b6771680ef93719d730caa43cd5558240f6ee4 (diff) | |
AudioService: Add the AudioDeviceBroker's message queue to the dump
Clogged queue means device-related requests will not be served.
Example dump snippet:
AudioDeviceBroker:
Message handler (watch for unhandled messages):
Handler (com.android.server.audio.AudioDeviceBroker$BrokerHandler) {753fed2} @ 359741
Looper (AudioDeviceBroker, tid 115) {ed3aba3}
(Total messages: 0, polling=true, quitting=false)
Bug: 135763139
Test: adb shell dumpsys audio
Change-Id: If2130a4bd8bd9536df01656fe1a8f94548912ab9
Merged-In: If2130a4bd8bd9536df01656fe1a8f94548912ab9
| -rw-r--r-- | services/core/java/com/android/server/audio/AudioDeviceBroker.java | 11 | ||||
| -rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java index 884ecbaac058..4d09c3b73a9d 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java +++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java @@ -40,9 +40,11 @@ import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.util.Log; +import android.util.PrintWriterPrinter; import com.android.internal.annotations.GuardedBy; +import java.io.PrintWriter; /** @hide */ /*package*/ final class AudioDeviceBroker { @@ -597,6 +599,15 @@ import com.android.internal.annotations.GuardedBy; } } + /*package*/ void dump(PrintWriter pw, String prefix) { + if (mBrokerHandler != null) { + pw.println(prefix + "Message handler (watch for unhandled messages):"); + mBrokerHandler.dump(new PrintWriterPrinter(pw), prefix + " "); + } else { + pw.println("Message handler is null"); + } + } + //--------------------------------------------------------------------- // Internal handling of messages // These methods are ALL synchronous, in response to message handling in BrokerHandler diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index df8c480d3b30..5aa6a60bd44a 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -6417,11 +6417,12 @@ public class AudioService extends IAudioService.Stub dumpAudioPolicies(pw); mDynPolicyLogger.dump(pw); - mPlaybackMonitor.dump(pw); - mRecordMonitor.dump(pw); + pw.println("\nAudioDeviceBroker:"); + mDeviceBroker.dump(pw, " "); + pw.println("\n"); pw.println("\nEvent logs:"); mModeLogger.dump(pw); |