Clear parent/child tab relationships when clearing history.

Fixes http://b/issue?id=2330279
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index 25e364b..8ee6649 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -682,12 +682,17 @@
         super.onBackPressed();
     }
 
-    // This Activity is generally a sub-Activity of CombinedHistoryActivity. In
-    // that situation, we need to pass our result code up to our parent.
-    // However, if someone calls this Activity directly, then this has no
-    // parent, and it needs to set it on itself.
+    // This Activity is generally a sub-Activity of
+    // CombinedBookmarkHistoryActivity. In that situation, we need to pass our
+    // result code up to our parent. However, if someone calls this Activity
+    // directly, then this has no parent, and it needs to set it on itself.
     private void setResultToParent(int resultCode, Intent data) {
-        Activity a = getParent() == null ? this : getParent();
-        a.setResult(resultCode, data);
+        Activity parent = getParent();
+        if (parent == null) {
+            setResult(resultCode, data);
+        } else {
+            ((CombinedBookmarkHistoryActivity) parent).setResultFromChild(
+                    resultCode, data);
+        }
     }
 }