DirectReply: fix lockscreen crash

Fixes a crash that happens when direct reply is triggered and
the view is detached between clicking and unlocking.

Change-Id: I647560a24f9a26a28e86df436b45d5f496454eb8
Fixes: 32171748
This commit is contained in:
Adrian Roos
2016-10-17 15:08:03 -07:00
parent d183e0b988
commit b22665db0c

View File

@@ -4231,7 +4231,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
updateKeyguardState(staying, false /* fromShadeLocked */);
if (viewToClick != null) {
if (viewToClick != null && viewToClick.isAttachedToWindow()) {
viewToClick.callOnClick();
}