diff options
| author | Leon Scroggins <scroggo@google.com> | 2010-05-10 17:27:26 -0400 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2010-05-11 08:49:03 -0400 |
| commit | 70a153b61fc7606e6bb4dd279013ba87804b86e6 (patch) | |
| tree | 4d8336bd3fb4d2372b48499f6a1035328d25291a /src | |
| parent | 79e36d97b67bf06b1e0c0edf773882e93a3293e4 (diff) | |
| download | packages_apps_Browser-70a153b61fc7606e6bb4dd279013ba87804b86e6.tar.gz packages_apps_Browser-70a153b61fc7606e6bb4dd279013ba87804b86e6.tar.bz2 packages_apps_Browser-70a153b61fc7606e6bb4dd279013ba87804b86e6.zip | |
Add debugging information to help fix bug 2289137.
Change-Id: I0ef5d006988267ac8dd5f2f6d42c923fea90ecc4
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/browser/ActiveTabsPage.java | 14 | ||||
| -rw-r--r-- | src/com/android/browser/Tab.java | 7 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/com/android/browser/ActiveTabsPage.java b/src/com/android/browser/ActiveTabsPage.java index 2de778712..52828b301 100644 --- a/src/com/android/browser/ActiveTabsPage.java +++ b/src/com/android/browser/ActiveTabsPage.java @@ -20,6 +20,7 @@ import android.content.Context; import android.graphics.Bitmap; import android.os.Handler; import android.util.AttributeSet; +import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; @@ -32,6 +33,7 @@ import android.widget.ListView; import android.widget.TextView; public class ActiveTabsPage extends LinearLayout { + private static final String LOGTAG = "TabPicker"; private final BrowserActivity mBrowserActivity; private final LayoutInflater mFactory; private final TabControl mControl; @@ -152,7 +154,19 @@ public class ActiveTabsPage extends LinearLayout { (ImageView) convertView.findViewById(R.id.favicon); View close = convertView.findViewById(R.id.close); Tab tab = mControl.getTab(position); + if (tab.getWebView() == null) { + // This means that populatePickerData will have to use the + // saved state. + Log.w(LOGTAG, "Tab " + position + " has a null WebView and " + + (tab.getSavedState() == null ? "null" : "non-null") + + " saved state "); + } tab.populatePickerData(); + if (tab.getTitle() == null || tab.getTitle().length() == 0) { + Log.w(LOGTAG, "Tab " + position + " has no title. " + + "Check above in the Logs to see whether it has a " + + "null WebView or null WebHistoryItem"); + } title.setText(tab.getTitle()); url.setText(tab.getUrl()); Bitmap icon = tab.getFavicon(); diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index 921ecb358..b583dbc03 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -1825,6 +1825,9 @@ class Tab { // FIXME: The only place we cared about subwindow was for // bookmarking (i.e. not when saving state). Was this deliberate? final WebBackForwardList list = mMainView.copyBackForwardList(); + if (list == null) { + Log.w(LOGTAG, "populatePickerData called and WebBackForwardList is null"); + } final WebHistoryItem item = list != null ? list.getCurrentItem() : null; populatePickerData(item); } @@ -1833,7 +1836,9 @@ class Tab { // WebView. private void populatePickerData(WebHistoryItem item) { mPickerData = new PickerData(); - if (item != null) { + if (item == null) { + Log.w(LOGTAG, "populatePickerData called with a null WebHistoryItem"); + } else { mPickerData.mUrl = item.getUrl(); mPickerData.mTitle = item.getTitle(); mPickerData.mFavicon = item.getFavicon(); |
