diff options
author | Yorke Lee <yorkelee@google.com> | 2013-06-10 10:21:57 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-06-10 10:37:26 -0700 |
commit | 1dd46a5c676325d20b7a042d0d0d3c7d9365d0bd (patch) | |
tree | ceff2eb90090b28f0df9b0c4ca7c10d521adea22 | |
parent | 3a18654bf87df4f17880551b6cfa45c871917960 (diff) |
Fix crash in Dialer in landscape mode
Bug 9369806
Change-Id: I286ebb828c0f6ce7c005c541661b9aa67284847e
-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 3d75e3983..5f70312ff 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -368,7 +368,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); @@ -556,7 +557,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"); @@ -1731,7 +1732,9 @@ public class DialpadFragment extends Fragment mSmartDialCache.cacheIfNeeded(true); } } else { - mSmartDialContainer.setVisibility(View.GONE); + if (mSmartDialContainer != null) { + mSmartDialContainer.setVisibility(View.GONE); + } mSmartDialCache = null; } } |