summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/TabHost.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/widget/TabHost.java')
-rw-r--r--core/java/android/widget/TabHost.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index 03eea66..57a8531 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -183,18 +183,14 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
protected void onAttachedToWindow() {
super.onAttachedToWindow();
final ViewTreeObserver treeObserver = getViewTreeObserver();
- if (treeObserver != null) {
- treeObserver.addOnTouchModeChangeListener(this);
- }
+ treeObserver.addOnTouchModeChangeListener(this);
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
final ViewTreeObserver treeObserver = getViewTreeObserver();
- if (treeObserver != null) {
- treeObserver.removeOnTouchModeChangeListener(this);
- }
+ treeObserver.removeOnTouchModeChangeListener(this);
}
/**