summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/dialpad/DialpadFragment.java9
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;
}
}