Improve MediaButtonReceiverHolder toString()
This exposes the MBR's component name and session package name, which will be quite helpful for the media_session dumpsys. Bug: 205124386 Bug: 244312001 Test: adb shell dumpsys media_session Change-Id: I48a6df78e8642e8ed8334fdfc75b1a6a52530e57
This commit is contained in:
@@ -246,10 +246,13 @@ final class MediaButtonReceiverHolder {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (mPendingIntent != null) {
|
||||
return "MBR {pi=" + mPendingIntent + ", type=" + mComponentType + "}";
|
||||
}
|
||||
return "Restored MBR {component=" + mComponentName + ", type=" + mComponentType + "}";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("MBR {pi=").append(mPendingIntent);
|
||||
sb.append(", componentName=").append(mComponentName);
|
||||
sb.append(", type=").append(mComponentType);
|
||||
sb.append(", pkg=").append(mPackageName);
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user