From 9e6344212a53cd1ae997cd85da5751585a9de504 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Mon, 8 Jun 2015 18:17:13 -0700 Subject: [PATCH] Make WidgetsRecyclerView not crash on MNC support lib Change-Id: Ia7bee39752ad0c0b58e74df4507caaf7a3cd8c29 --- src/com/android/launcher3/widget/WidgetsRecyclerView.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/widget/WidgetsRecyclerView.java b/src/com/android/launcher3/widget/WidgetsRecyclerView.java index 4aa3323801..9d265f87e3 100644 --- a/src/com/android/launcher3/widget/WidgetsRecyclerView.java +++ b/src/com/android/launcher3/widget/WidgetsRecyclerView.java @@ -25,7 +25,6 @@ import android.view.View; import com.android.launcher3.BaseRecyclerView; import com.android.launcher3.Utilities; -import com.android.launcher3.compat.AlphabeticIndexCompat; import com.android.launcher3.model.WidgetsModel; import com.android.launcher3.model.PackageItemInfo; @@ -37,7 +36,6 @@ public class WidgetsRecyclerView extends BaseRecyclerView { private static final String TAG = "WidgetsRecyclerView"; private WidgetsModel mWidgets; private Rect mBackgroundPadding = new Rect(); - private PackageItemInfo mLastPackageItemInfo; public WidgetsRecyclerView(Context context) { this(context, null); @@ -48,9 +46,15 @@ public class WidgetsRecyclerView extends BaseRecyclerView { } public WidgetsRecyclerView(Context context, AttributeSet attrs, int defStyleAttr) { + // API 21 and below only support 3 parameter ctor. super(context, attrs, defStyleAttr); } + public WidgetsRecyclerView(Context context, AttributeSet attrs, int defStyleAttr, + int defStyleRes) { + this(context, attrs, defStyleAttr); + } + @Override protected void onFinishInflate() { super.onFinishInflate();