Insulate SystemUI from IDs in inflated notification views.
We use the hidden View.setIsRootNamespace() in the same way
that AppWidgetHostView does: to block recursive ID search
traversals from traveling into notification views, which
might have children with IDs that collide with SystemUI's
own views. (Views inside notifications can still be located
by ID, but you need to start your search inside the
inflated notification row.)
Bug: 13421971
Change-Id: If8b81b9d0ed4b0eb6fa1e028275caa0b932f5759
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index eb07d88..a89921f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -931,6 +931,7 @@
}
if (contentViewLocal != null) {
+ contentViewLocal.setIsRootNamespace(true);
SizeAdaptiveLayout.LayoutParams params =
new SizeAdaptiveLayout.LayoutParams(contentViewLocal.getLayoutParams());
params.minHeight = minHeight;
@@ -938,6 +939,7 @@
expanded.addView(contentViewLocal, params);
}
if (bigContentViewLocal != null) {
+ bigContentViewLocal.setIsRootNamespace(true);
SizeAdaptiveLayout.LayoutParams params =
new SizeAdaptiveLayout.LayoutParams(bigContentViewLocal.getLayoutParams());
params.minHeight = minHeight+1;
@@ -955,6 +957,7 @@
expandedPublic, mOnClickHandler);
if (publicViewLocal != null) {
+ publicViewLocal.setIsRootNamespace(true);
SizeAdaptiveLayout.LayoutParams params =
new SizeAdaptiveLayout.LayoutParams(publicViewLocal.getLayoutParams());
params.minHeight = minHeight;