diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/browser/NavTabScroller.java | 12 | ||||
-rw-r--r-- | src/com/android/browser/NavTabView.java | 4 | ||||
-rw-r--r-- | src/com/android/browser/TabControl.java | 6 |
3 files changed, 9 insertions, 13 deletions
diff --git a/src/com/android/browser/NavTabScroller.java b/src/com/android/browser/NavTabScroller.java index bd26df7..312e2b8 100644 --- a/src/com/android/browser/NavTabScroller.java +++ b/src/com/android/browser/NavTabScroller.java @@ -197,17 +197,7 @@ public class NavTabScroller extends FrameLayout { int bottom = child.getBottom(); if (top <= midy && bottom >= midy) { sel = i; - } else { - // check if on screen - if (top > getScrollY() + getHeight() || bottom < getScrollY()) { - if (!child.isPaused()) { - child.pause(); - } - } else { - if (child.isPaused()) { - child.resume(); - } - } + break; } } if (sel != -1) { diff --git a/src/com/android/browser/NavTabView.java b/src/com/android/browser/NavTabView.java index 061e024..f170b0f 100644 --- a/src/com/android/browser/NavTabView.java +++ b/src/com/android/browser/NavTabView.java @@ -198,7 +198,9 @@ public class NavTabView extends LinearLayout { @Override public void onDetachedFromWindow() { - mWebView.setProxyView(null); + if (mWebView != null) { + mWebView.setProxyView(null); + } } private static void removeFromParent(View v) { diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java index 0aaf3d6..1e21431 100644 --- a/src/com/android/browser/TabControl.java +++ b/src/com/android/browser/TabControl.java @@ -286,7 +286,11 @@ class TabControl { } } outState.putLongArray(POSITIONS, ids); - final long cid = getCurrentTab().getId(); + Tab current = getCurrentTab(); + long cid = -1; + if (current != null) { + cid = current.getId(); + } outState.putLong(CURRENT, cid); } |