summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-07-17 13:40:31 -0700
committerJohn Reck <jreck@google.com>2011-07-17 13:40:31 -0700
commit11687f87b52c5f8ef34e7ad83c352242f49e7a81 (patch)
tree7301252aeccbe47d785225e7f7357097269ea819 /src/com
parenta48377d67a3568a7e117f2c4011cd49a871bd13c (diff)
downloadpackages_apps_browser-11687f87b52c5f8ef34e7ad83c352242f49e7a81.zip
packages_apps_browser-11687f87b52c5f8ef34e7ad83c352242f49e7a81.tar.gz
packages_apps_browser-11687f87b52c5f8ef34e7ad83c352242f49e7a81.tar.bz2
Fix drawing order bug
Bug: 5031335 Gallery could return an invalid index leading to a NPE The override for getDrawingOrder appears unnecessary for how we are using gallery, so removing it entirely Change-Id: I931cc2db6e601a00941c23585b57664607f4e519
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/view/Gallery.java18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/com/android/browser/view/Gallery.java b/src/com/android/browser/view/Gallery.java
index aa6ed65..0c73537 100644
--- a/src/com/android/browser/view/Gallery.java
+++ b/src/com/android/browser/view/Gallery.java
@@ -1196,24 +1196,6 @@ public class Gallery extends ViewGroup implements
}
@Override
- protected int getChildDrawingOrder(int childCount, int i) {
- int selectedIndex = mSelectedPosition - mFirstPosition;
- // Just to be safe
- if (selectedIndex < 0)
- return i;
- if (i == childCount - 1) {
- // Draw the selected child last
- return selectedIndex;
- } else if (i >= selectedIndex) {
- // Move the children to the right of the selected child earlier one
- return i + 1;
- } else {
- // Keep the children to the left of the selected child the same
- return i;
- }
- }
-
- @Override
protected void onFocusChanged(boolean gainFocus, int direction,
Rect previouslyFocusedRect) {
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);