Fix potential NPE in telephony registry dumpsys.

There is no guarantee that mImsCallDisconnectCause will be non-null, so
we should not be calling toString here.

Test: Compile/build
Fixes: 129251351
Change-Id: I8b983ce8fa7f5316bc474ffbd67052ae0df4d75d
This commit is contained in:
Tyler Gunn
2019-03-25 07:26:33 -07:00
parent 09426de69d
commit f3f89d0c2b

View File

@@ -1883,7 +1883,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
pw.println("mDataConnectionState=" + mDataConnectionState[i]);
pw.println("mCellLocation=" + mCellLocation[i]);
pw.println("mCellInfo=" + mCellInfo.get(i));
pw.println("mImsCallDisconnectCause=" + mImsReasonInfo.get(i).toString());
pw.println("mImsCallDisconnectCause=" + mImsReasonInfo.get(i));
pw.decreaseIndent();
}
pw.println("mCallNetworkType=" + mCallNetworkType);