Merge "Attempted fix for issue 7469415" into jb-mr1-lockscreen-dev

This commit is contained in:
Adam Cohen
2012-11-06 13:23:24 -08:00
committed by Android (Google) Code Review

View File

@@ -351,12 +351,12 @@ public class RemoteViews implements Parcelable, Filter {
public void onClick(View v) {
// Insure that this view is a child of an AdapterView
View parent = (View) v.getParent();
while (!(parent instanceof AdapterView<?>)
while (parent != null && !(parent instanceof AdapterView<?>)
&& !(parent instanceof AppWidgetHostView)) {
parent = (View) parent.getParent();
}
if (parent instanceof AppWidgetHostView) {
if (parent instanceof AppWidgetHostView || parent == null) {
// Somehow they've managed to get this far without having
// and AdapterView as a parent.
Log.e("RemoteViews", "Collection item doesn't have AdapterView parent");