Merge "Ensure connection is non-null" into rvc-dev am: 402bbb4a57

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11902845

Change-Id: Ia9309066df1666bc0f122af929f2707d0b125ef7