summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2014-09-26 16:50:35 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-09-26 16:50:36 +0000
commit7e3bfca8d0eef90aa08f36b5067fb37301fad8f2 (patch)
treeb44062b5fe2d9cab3cc80eafc97e264375cbf9ec
parenta2b48057e1a15bc9e88a764cad16cda784dc4c04 (diff)
parentf4d7fc3687e794c54ffc93b9cc7374460074e12e (diff)
Merge "Fixed a crash with disapearing views" into lmp-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
index c869ba48eb67..0d5ebe71e5d2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
@@ -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);