Fix NPE which is causing com.android.phone to crash.

It is possible for getOriginalConnection() to return null at the end of
a call once the RIL has disconnected it.  Added null check to ensure
that isImsConnection() won't throw an NPE in this case.

The original code was the following, which is inherently NPE safe:
return getOriginalConnection() instanceof ImsPhoneConnection;

Bug: 26222625
Change-Id: Iaa77a4d739578ddcfbbb5849f7ddf15e3bad0f76
1 file changed