diff options
author | Yorke Lee <yorkelee@google.com> | 2013-06-11 14:18:36 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-06-11 14:18:36 -0700 |
commit | a2955d420859e61e6817eb6886999d652bad31d9 (patch) | |
tree | b995952ac173dbdb3a753d25935e2ea6ea0c8bac | |
parent | c41cd95dec8273b65c7d90a4895c29659f95691d (diff) | |
parent | 1dd46a5c676325d20b7a042d0d0d3c7d9365d0bd (diff) |
am 1dd46a5c: Fix crash in Dialer in landscape mode
* commit '1dd46a5c676325d20b7a042d0d0d3c7d9365d0bd':
Fix crash in Dialer in landscape mode
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 4034d9cbe..a8984bd26 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -378,7 +378,8 @@ public class DialpadFragment extends Fragment mDialpadChooser = (ListView) fragmentView.findViewById(R.id.dialpadChooser); mDialpadChooser.setOnItemClickListener(this); - // Smart dial + // Smart dial container. This is null if in landscape mode since it is not present + // in the landscape dialer layout. mSmartDialContainer = (RelativeLayout) fragmentView.findViewById( R.id.dialpad_smartdial_container); @@ -574,7 +575,7 @@ public class DialpadFragment extends Fragment // retrieve dialpad autocomplete setting mSmartDialEnabled = Settings.Secure.getInt(contentResolver, - Settings.Secure.DIALPAD_AUTOCOMPLETE, 0) == 1; + Settings.Secure.DIALPAD_AUTOCOMPLETE, 0) == 1 && mSmartDialContainer != null; stopWatch.lap("dtwd"); @@ -1721,7 +1722,9 @@ public class DialpadFragment extends Fragment mSmartDialCache.cacheIfNeeded(true); } } else { - mSmartDialContainer.setVisibility(View.GONE); + if (mSmartDialContainer != null) { + mSmartDialContainer.setVisibility(View.GONE); + } mSmartDialCache = null; } } |