diff options
author | Ben Murdoch <benm@google.com> | 2009-10-28 13:22:46 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-10-28 13:22:46 +0000 |
commit | 9907efcdb03d1e038b3923d6c58f907b1fda4c5e (patch) | |
tree | 375253279b74a4ae7000d2f975e245ae67d3f52b /src/com/android/browser/BrowserBookmarksAdapter.java | |
parent | ae59c3f5a5b492f91d72e1d26702a13b91a43fa4 (diff) | |
download | packages_apps_Browser-9907efcdb03d1e038b3923d6c58f907b1fda4c5e.zip packages_apps_Browser-9907efcdb03d1e038b3923d6c58f907b1fda4c5e.tar.gz packages_apps_Browser-9907efcdb03d1e038b3923d6c58f907b1fda4c5e.tar.bz2 |
When displaying a bookmark item, only truncate the Strings that we display in the ListView rather than the ones used to index into the bookmarks database. This caused a crash when bookmarks had titles longer than the text view limit.
Fix for b/2219781
Change-Id: I4ea3cdfbaedce0dea6bd69f560aae9aea71ed7c1
Diffstat (limited to 'src/com/android/browser/BrowserBookmarksAdapter.java')
-rw-r--r-- | src/com/android/browser/BrowserBookmarksAdapter.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java index dd56d2f..d1fdf07 100644 --- a/src/com/android/browser/BrowserBookmarksAdapter.java +++ b/src/com/android/browser/BrowserBookmarksAdapter.java @@ -540,15 +540,8 @@ class BrowserBookmarksAdapter extends BaseAdapter { private void bind(BookmarkItem b, int position) { mCursor.moveToPosition(position- mExtraOffset); - String title = mCursor.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX); - if (title.length() > BrowserSettings.MAX_TEXTVIEW_LEN) { - title = title.substring(0, BrowserSettings.MAX_TEXTVIEW_LEN); - } - b.setName(title); + b.setName(mCursor.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX)); String url = mCursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX); - if (url.length() > BrowserSettings.MAX_TEXTVIEW_LEN) { - url = url.substring(0, BrowserSettings.MAX_TEXTVIEW_LEN); - } b.setUrl(url); byte[] data = mCursor.getBlob(Browser.HISTORY_PROJECTION_FAVICON_INDEX); if (data != null) { |