From fefc60eeff8be1043d6541518b760e110a02501d Mon Sep 17 00:00:00 2001 From: Jay Shrauner Date: Wed, 13 May 2015 12:50:47 -0700 Subject: Fix NPE in keyPressed when getView is null Bug:21120753 Change-Id: I2e82e4a8e7b8226a2d74753d37ff36d1d3ab367e --- src/com/android/dialer/dialpad/DialpadFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java') diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 6a66eb388..2ac1a5c6d 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -722,7 +722,7 @@ public class DialpadFragment extends Fragment } private void keyPressed(int keyCode) { - if (getView().getTranslationY() != 0) { + if (getView() == null || getView().getTranslationY() != 0) { return; } switch (keyCode) { -- cgit v1.2.3