diff options
Diffstat (limited to 'ui/src/com/android/providers/downloads/ui/DateSortedExpandableListAdapter.java')
-rw-r--r-- | ui/src/com/android/providers/downloads/ui/DateSortedExpandableListAdapter.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/src/com/android/providers/downloads/ui/DateSortedExpandableListAdapter.java b/ui/src/com/android/providers/downloads/ui/DateSortedExpandableListAdapter.java index 19132a11..73c51aef 100644 --- a/ui/src/com/android/providers/downloads/ui/DateSortedExpandableListAdapter.java +++ b/ui/src/com/android/providers/downloads/ui/DateSortedExpandableListAdapter.java @@ -226,6 +226,19 @@ public class DateSortedExpandableListAdapter implements ExpandableListAdapter { return arrayPosition; } + int getAbsolutePositionForGroupAndChildPositions(int groupPosition, + int childPosition) { + int bin = groupPositionToBin(groupPosition); + int absolutePosition = 0; + for (int j = 0; j < bin; j++) { + if (mItemMap[j] > 0) { + absolutePosition += mItemMap[j] + 1; + } + } + absolutePosition += childPosition + 1; + return absolutePosition; + } + /** * Move the cursor to the position indicated. * @param packedPosition Position in packed position representation. |