From 6690d018b9c08757d20182170948a3cba961e84c Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Wed, 17 Jun 2015 16:41:56 -0700 Subject: Un-hide ViewGroup#onViewAdded/onViewRemoved These methods are generally useful for writing custom views, and by exposing them we make it easier for custom view authors to still allow app developers to use an OnHierarchyChangedListener since it will not be occupied by a custom view's implementation. Also move the actual dispatch to package-scoped dispatch methods so that a developer forgetting to call super won't stop a listener from functioning. Bug 21866523 Change-Id: Ie2bb5e241d7c5a02a5033f33ecdaeb40aceb20b5 --- .../systemui/statusbar/stack/NotificationStackScrollLayout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 1bf4547..1bb07a8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -1608,7 +1608,7 @@ public class NotificationStackScrollLayout extends ViewGroup } @Override - protected void onViewRemoved(View child) { + public void onViewRemoved(View child) { super.onViewRemoved(child); // we only call our internal methods if this is actually a removal and not just a // notification which becomes a child notification @@ -1745,7 +1745,7 @@ public class NotificationStackScrollLayout extends ViewGroup } @Override - protected void onViewAdded(View child) { + public void onViewAdded(View child) { super.onViewAdded(child); onViewAddedInternal(child); } -- cgit v1.1