diff options
author | Leon Scroggins <scroggo@google.com> | 2010-01-11 13:06:21 -0500 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-01-11 13:06:21 -0500 |
commit | fde9746ac3055848e110c35f19ec5893c621f766 (patch) | |
tree | fd1e49ba64e33fbdf53d294ae3ab2898c9994e2f /src/com/android/browser/BrowserBookmarksPage.java | |
parent | 02065b07aea6b4392c344a4172c3ab56019225ed (diff) | |
download | packages_apps_Browser-fde9746ac3055848e110c35f19ec5893c621f766.zip packages_apps_Browser-fde9746ac3055848e110c35f19ec5893c621f766.tar.gz packages_apps_Browser-fde9746ac3055848e110c35f19ec5893c621f766.tar.bz2 |
Clear parent/child tab relationships when clearing history.
Fixes http://b/issue?id=2330279
Diffstat (limited to 'src/com/android/browser/BrowserBookmarksPage.java')
-rw-r--r-- | src/com/android/browser/BrowserBookmarksPage.java | 17 |
1 files changed, 11 insertions, 6 deletions
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 @@ public class BrowserBookmarksPage extends Activity implements 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); + } } } |