diff options
author | Winson Chung <winsonc@google.com> | 2011-05-16 16:28:53 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-05-16 16:44:38 -0700 |
commit | b3715fe227dfaafa66479228276ef0329925085f (patch) | |
tree | c665be8a2b038cca4f334a7f4c6d364bd39e1b80 /src/com/android/launcher2/PagedViewCellLayout.java | |
parent | 1c29b18e28988f9558da5dab5eed3e51d38df355 (diff) | |
download | android_packages_apps_Trebuchet-b3715fe227dfaafa66479228276ef0329925085f.tar.gz android_packages_apps_Trebuchet-b3715fe227dfaafa66479228276ef0329925085f.tar.bz2 android_packages_apps_Trebuchet-b3715fe227dfaafa66479228276ef0329925085f.zip |
Adding check before we try and remove associated holographic icons (in the case there are none generated).
Change-Id: If06693f7218c3388c3ba6481a07655ed7386391d
Diffstat (limited to 'src/com/android/launcher2/PagedViewCellLayout.java')
-rw-r--r-- | src/com/android/launcher2/PagedViewCellLayout.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java index 54bdec40c..6a3c84d03 100644 --- a/src/com/android/launcher2/PagedViewCellLayout.java +++ b/src/com/android/launcher2/PagedViewCellLayout.java @@ -169,7 +169,11 @@ public class PagedViewCellLayout extends ViewGroup implements Page { @Override public void removeViewOnPageAt(int index) { mChildren.removeViewAt(index); - mHolographicChildren.removeViewAt(index); + // Holographic icons are disabled in certain cases (on lower hardware, or if there is only + // one page), so check before we try and remove the view at a specified index. + if (mHolographicChildren.getChildAt(index) != null) { + mHolographicChildren.removeViewAt(index); + } } @Override |