OSDN Git Service

Fix potential NPE in telephony registry dumpsys.
authorTyler Gunn <tgunn@google.com>
Mon, 25 Mar 2019 14:26:33 +0000 (07:26 -0700)
committerTyler Gunn <tgunn@google.com>
Mon, 25 Mar 2019 14:26:33 +0000 (07:26 -0700)
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

services/core/java/com/android/server/TelephonyRegistry.java

index e78ae55..d7686ae 100644 (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);