Merge "AudioService: dump routing cache in AudioSystemAdapter" into sc-v2-dev am: 2969fc57f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16591745 Change-Id: I98d49fa9d0e126162e7e8d6d290aa03f4370d144
This commit is contained in:
@@ -1351,7 +1351,7 @@ public class AudioSystem
|
||||
return DEVICE_OUT_BLE_SPEAKER_NAME;
|
||||
case DEVICE_OUT_DEFAULT:
|
||||
default:
|
||||
return Integer.toString(device);
|
||||
return "0x" + Integer.toHexString(device);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9055,8 +9055,6 @@ public class AudioService extends IAudioService.Stub
|
||||
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
|
||||
|
||||
mAudioSystem.dump(pw);
|
||||
|
||||
sLifecycleLogger.dump(pw);
|
||||
if (mAudioHandler != null) {
|
||||
pw.println("\nMessage handler (watch for unhandled messages):");
|
||||
@@ -9136,6 +9134,8 @@ public class AudioService extends IAudioService.Stub
|
||||
pw.println("mHasSpatializerEffect:" + mHasSpatializerEffect);
|
||||
pw.println("isSpatializerEnabled:" + isSpatializerEnabled());
|
||||
pw.println("isSpatialAudioEnabled:" + isSpatialAudioEnabled());
|
||||
|
||||
mAudioSystem.dump(pw);
|
||||
}
|
||||
|
||||
private void dumpSupportedSystemUsage(PrintWriter pw) {
|
||||
|
||||
@@ -524,11 +524,28 @@ public class AudioSystemAdapter implements AudioSystem.RoutingUpdateCallback {
|
||||
* @param pw
|
||||
*/
|
||||
public void dump(PrintWriter pw) {
|
||||
pw.println("\nAudioSystemAdapter:");
|
||||
pw.println(" mDevicesForStreamCache:");
|
||||
if (mDevicesForStreamCache != null) {
|
||||
for (Integer stream : mDevicesForStreamCache.keySet()) {
|
||||
pw.println("\t stream:" + stream + " device:"
|
||||
+ AudioSystem.getOutputDeviceName(mDevicesForStreamCache.get(stream)));
|
||||
}
|
||||
}
|
||||
pw.println(" mDevicesForAttrCache:");
|
||||
if (mDevicesForAttrCache != null) {
|
||||
for (AudioAttributes attr : mDevicesForAttrCache.keySet()) {
|
||||
pw.println("\t" + attr);
|
||||
for (AudioDeviceAttributes devAttr : mDevicesForAttrCache.get(attr)) {
|
||||
pw.println("\t\t" + devAttr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ENABLE_GETDEVICES_STATS) {
|
||||
// only stats in this dump
|
||||
// only stats in the rest of this dump
|
||||
return;
|
||||
}
|
||||
pw.println("\nAudioSystemAdapter:");
|
||||
for (int i = 0; i < NB_MEASUREMENTS; i++) {
|
||||
pw.println(mMethodNames[i]
|
||||
+ ": counter=" + mMethodCallCounter[i]
|
||||
|
||||
Reference in New Issue
Block a user