Use Launcher.getLauncher(Context) instead of type-casting.
Bug: 32010039
Change-Id: Icb80d3e547a706740b84df2cb80f99e4a7f81c43
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index f9424d4..0fbbc19 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -67,7 +67,7 @@
public Hotseat(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
- mLauncher = (Launcher) context;
+ mLauncher = Launcher.getLauncher(context);
mHasVerticalHotseat = mLauncher.getDeviceProfile().isVerticalBarLayout();
mBackgroundColor = ColorUtils.setAlphaComponent(
ContextCompat.getColor(context, R.color.all_apps_container_color), 0);