From 4e077af2b9a50a72f4268a795bc744cd4aae5e54 Mon Sep 17 00:00:00 2001 From: Jay Shrauner Date: Tue, 2 Sep 2014 15:01:15 -0700 Subject: Fix NPE when activity is null Bug:17360566 Change-Id: I20f3b0843bc8766ea1ded91b30c2662ea08cf7df --- src/com/android/dialer/dialpad/DialpadFragment.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/com/android/dialer/dialpad') diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 141a45188..909679191 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -1204,6 +1204,9 @@ public class DialpadFragment extends AnalyticsFragment * of the regular Dialer UI */ private void showDialpadChooser(boolean enabled) { + if (getActivity() == null) { + return; + } // Check if onCreateView() is already called by checking one of View objects. if (!isLayoutReady()) { return; -- cgit v1.2.3