Use ContextCompat.getColor to support API levels below 23.
Found while debugging on Lollipop.
Change-Id: Ibe97fd30c4ee8cd0c1735a41802b859345f9e931
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index c738480..f9424d4 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -25,6 +25,7 @@
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
+import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.ColorUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -69,7 +70,7 @@
mLauncher = (Launcher) context;
mHasVerticalHotseat = mLauncher.getDeviceProfile().isVerticalBarLayout();
mBackgroundColor = ColorUtils.setAlphaComponent(
- context.getColor(R.color.all_apps_container_color), 0);
+ ContextCompat.getColor(context, R.color.all_apps_container_color), 0);
mBackground = new ColorDrawable(mBackgroundColor);
setBackground(mBackground);
}