diff options
author | John Reck <jreck@google.com> | 2012-05-04 13:53:25 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-05-04 13:53:25 -0700 |
commit | 9ee87d9ce5aae1460f53bea66bfcafd3671505a0 (patch) | |
tree | 8b866f9ad37661878944ed4a51c6d155fefecb75 /src/com/android/browser/util | |
parent | b0fb2baae970c52b0dcf2f0677df5d89078f1480 (diff) | |
download | packages_apps_Browser-9ee87d9ce5aae1460f53bea66bfcafd3671505a0.zip packages_apps_Browser-9ee87d9ce5aae1460f53bea66bfcafd3671505a0.tar.gz packages_apps_Browser-9ee87d9ce5aae1460f53bea66bfcafd3671505a0.tar.bz2 |
Fix getItemId()
Bug: 6446119
Change-Id: If8c13c9f2cb9b93c6f3575f12111059aeeacd5cb
Diffstat (limited to 'src/com/android/browser/util')
-rw-r--r-- | src/com/android/browser/util/ThreadedCursorAdapter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/browser/util/ThreadedCursorAdapter.java b/src/com/android/browser/util/ThreadedCursorAdapter.java index b70ca36..72a07ea 100644 --- a/src/com/android/browser/util/ThreadedCursorAdapter.java +++ b/src/com/android/browser/util/ThreadedCursorAdapter.java @@ -137,7 +137,9 @@ public abstract class ThreadedCursorAdapter<T> extends BaseAdapter { @Override public long getItemId(int position) { - return position; + synchronized (mCursorLock) { + return getItemId(getItem(position)); + } } private void loadRowObject(int position, LoadContainer container) { @@ -207,4 +209,5 @@ public abstract class ThreadedCursorAdapter<T> extends BaseAdapter { public abstract void bindView(View view, T object); public abstract T getRowObject(Cursor c, T recycleObject); public abstract T getLoadingObject(); + protected abstract long getItemId(Cursor c); }
\ No newline at end of file |