diff options
author | Tony <twickham@google.com> | 2016-10-07 12:50:01 -0700 |
---|---|---|
committer | Tony <twickham@google.com> | 2016-10-07 12:50:01 -0700 |
commit | 2fd020860533e18c64a93d14d11cb2d34bc9cbaf (patch) | |
tree | 509b35298eceb338ed7f91325c7d6cc48c907611 /src/com/android/launcher3/allapps | |
parent | 6e74e899d314663415f54895227bb79a51fd734b (diff) | |
download | android_packages_apps_Trebuchet-2fd020860533e18c64a93d14d11cb2d34bc9cbaf.tar.gz android_packages_apps_Trebuchet-2fd020860533e18c64a93d14d11cb2d34bc9cbaf.tar.bz2 android_packages_apps_Trebuchet-2fd020860533e18c64a93d14d11cb2d34bc9cbaf.zip |
Use Launcher.getLauncher(Context) instead of type-casting.
Bug: 32010039
Change-Id: Icb80d3e547a706740b84df2cb80f99e4a7f81c43
Diffstat (limited to 'src/com/android/launcher3/allapps')
3 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 5892787f3..77ef64233 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -696,7 +696,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc float distance = (float) Math.hypot(dx, dy); if (distance < viewConfig.getScaledTouchSlop()) { // The background was clicked, so just go home - Launcher launcher = (Launcher) getContext(); + Launcher launcher = Launcher.getLauncher(getContext()); launcher.showWorkspace(true); return true; } diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java index 1d5b209c2..b5afb2bd8 100644 --- a/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java @@ -49,7 +49,7 @@ public class AllAppsRecyclerViewContainerView extends FrameLayout public AllAppsRecyclerViewContainerView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); - Launcher launcher = (Launcher) context; + Launcher launcher = Launcher.getLauncher(context); DeviceProfile grid = launcher.getDeviceProfile(); mTouchFeedbackView = new ClickShadowView(context); diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 7127ec44b..173065be2 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -209,7 +209,7 @@ public class AlphabeticalAppsList { private int mNumAppRowsInAdapter; public AlphabeticalAppsList(Context context) { - mLauncher = (Launcher) context; + mLauncher = Launcher.getLauncher(context); mIndexer = new AlphabeticIndexCompat(context); mAppNameComparator = new AppNameComparator(context); } |