From 766d3bb5e46f262fdade4f1837e6bf421d4b0313 Mon Sep 17 00:00:00 2001 From: d34d Date: Tue, 26 Apr 2016 14:56:14 -0700 Subject: SysUI: Don't call removeAllViews on AdapterView Change-Id: I957c87e499fb719d1d45671c968c625dac75ecc7 TICKET: OPO-649 --- .../src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 661232f..a7d62cd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -106,6 +106,7 @@ import android.view.animation.AccelerateInterpolator; import android.view.animation.Interpolator; import android.view.animation.LinearInterpolator; import android.view.animation.PathInterpolator; +import android.widget.AdapterView; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; @@ -3882,7 +3883,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, removeAllViews((ViewGroup) child); } } - parent.removeAllViews(); + + // AdapterView does not support removeAllViews so check before calling + if (!(parent instanceof AdapterView)) parent.removeAllViews(); } /** -- cgit v1.1