Fixed a crash with disapearing views

Bug: 17660994
Change-Id: Id957bc65f0787860019c491559c4bca242ea620e
This commit is contained in:
Selim Cinek
2014-09-26 17:15:34 +02:00
parent 34cf5c4bfc
commit f4d7fc3687

View File

@@ -256,6 +256,9 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
}
private void startActivateAnimation(boolean reverse) {
if (!isAttachedToWindow()) {
return;
}
int widthHalf = mBackgroundNormal.getWidth()/2;
int heightHalf = mBackgroundNormal.getActualHeight()/2;
float radius = (float) Math.sqrt(widthHalf*widthHalf + heightHalf*heightHalf);