Merge "Fixed a crash with remote input" into qt-r1-dev am: 7c33cbcbcc
am: a038e98285

Change-Id: I50752b51594943c343c181f3303490c0da09dd30
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
index 70ee752..c9050d4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
@@ -398,7 +398,7 @@
             }
         }
 
-        if (!riv.isAttachedToWindow()) {
+        if (riv != null && !riv.isAttachedToWindow()) {
             // the remoteInput isn't attached to the window anymore :/ Let's focus on the expanded
             // one instead if it's available
             riv = null;