diff options
author | Tony Wickham <twickham@google.com> | 2017-03-15 14:41:18 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2017-03-15 14:46:02 -0700 |
commit | 81ebe383f5c9ef9ebff7fefe641469e74ec44f23 (patch) | |
tree | f37bf3d42de1d49a2ef4e5337cf1b3eb43cdda25 /src/com/android/launcher3/notification/NotificationFooterLayout.java | |
parent | a431fbb85090b180673c38b6d88f492a805282d6 (diff) | |
download | android_packages_apps_Trebuchet-81ebe383f5c9ef9ebff7fefe641469e74ec44f23.tar.gz android_packages_apps_Trebuchet-81ebe383f5c9ef9ebff7fefe641469e74ec44f23.tar.bz2 android_packages_apps_Trebuchet-81ebe383f5c9ef9ebff7fefe641469e74ec44f23.zip |
Small cleanup for notifications
- Add null check when collapsing footer, as container could be null
if the app is opened
- Remove redundant method that always passed mNotificationItemView
- Set mNotificationItemView to null when it is removed
Change-Id: Ia329815224b213fc688733eaaf6f29ee6888caaf
Diffstat (limited to 'src/com/android/launcher3/notification/NotificationFooterLayout.java')
-rw-r--r-- | src/com/android/launcher3/notification/NotificationFooterLayout.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/com/android/launcher3/notification/NotificationFooterLayout.java b/src/com/android/launcher3/notification/NotificationFooterLayout.java index 2e803417d..1eef743fe 100644 --- a/src/com/android/launcher3/notification/NotificationFooterLayout.java +++ b/src/com/android/launcher3/notification/NotificationFooterLayout.java @@ -198,15 +198,17 @@ public class NotificationFooterLayout extends FrameLayout { // There are no more icons in the footer, so hide it. PopupContainerWithArrow popup = PopupContainerWithArrow.getOpen( Launcher.getLauncher(getContext())); - Animator collapseFooter = popup.reduceNotificationViewHeight(getHeight(), - getResources().getInteger(R.integer.config_removeNotificationViewDuration)); - collapseFooter.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - ((ViewGroup) getParent()).removeView(NotificationFooterLayout.this); - } - }); - collapseFooter.start(); + if (popup != null) { + Animator collapseFooter = popup.reduceNotificationViewHeight(getHeight(), + getResources().getInteger(R.integer.config_removeNotificationViewDuration)); + collapseFooter.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + ((ViewGroup) getParent()).removeView(NotificationFooterLayout.this); + } + }); + collapseFooter.start(); + } } } |