Fix 4093841: Launcher crash after downloading app & hitting back

The last change to fix the "blue glow gone wild" re-introduced a NPE
caused by setting the pressed state of a BubbleTextView which has
been detached.

Change-Id: I726bace77dd04b6ac8f3e170dd9e1df00a183384
This commit is contained in:
Patrick Dubroy 2011-03-15 10:29:01 -07:00
parent 3499d8c89d
commit d69e11384c
1 changed files with 4 additions and 2 deletions

View File

@ -264,8 +264,10 @@ public class BubbleTextView extends TextView implements VisibilityChangedBroadca
void setCellLayoutPressedOrFocusedIcon() {
CellLayoutChildren parent = (CellLayoutChildren) getParent();
CellLayout cellLayout = (CellLayout) parent.getParent();
cellLayout.setPressedOrFocusedIcon((mPressedOrFocusedBackground != null) ? this : null);
if (parent != null) {
CellLayout layout = (CellLayout) parent.getParent();
layout.setPressedOrFocusedIcon((mPressedOrFocusedBackground != null) ? this : null);
}
}
Bitmap getPressedOrFocusedBackground() {