Improve logging in BluetoothHeadsetClientCall.

Bug: 26032099
Change-Id: I497edc9aa4c19cc7159993a899071e7b0c26db63
This commit is contained in:
Bryce Lee
2015-12-08 11:22:31 -08:00
parent 487f0d3d15
commit 3c67873f0a

View File

@@ -172,8 +172,12 @@ public final class BluetoothHeadsetClientCall implements Parcelable {
} }
public String toString() { public String toString() {
return toString(false);
}
public String toString(boolean loggable) {
StringBuilder builder = new StringBuilder("BluetoothHeadsetClientCall{mDevice: "); StringBuilder builder = new StringBuilder("BluetoothHeadsetClientCall{mDevice: ");
builder.append(mDevice); builder.append(loggable ? mDevice.hashCode() : mDevice);
builder.append(", mId: "); builder.append(", mId: ");
builder.append(mId); builder.append(mId);
builder.append(", mState: "); builder.append(", mState: ");
@@ -189,7 +193,7 @@ public final class BluetoothHeadsetClientCall implements Parcelable {
default: builder.append(mState); break; default: builder.append(mState); break;
} }
builder.append(", mNumber: "); builder.append(", mNumber: ");
builder.append(mNumber); builder.append(loggable ? mNumber.hashCode() : mNumber);
builder.append(", mMultiParty: "); builder.append(", mMultiParty: ");
builder.append(mMultiParty); builder.append(mMultiParty);
builder.append(", mOutgoing: "); builder.append(", mOutgoing: ");