Add a setter/getter for Launcher.mAllAppsButton.
Also, handle clicks on the all apps button by using onClick() method in
Launcher instead of directly calling onClickAllAppsButton in Hotseat.java
Bug 12553852
Change-Id: I261c27d3e964bbb1f52c2ab610997defd99a59bd
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 59d60e3..2ac2f00 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -156,15 +156,9 @@
allAppsButton.setContentDescription(context.getString(R.string.all_apps_button_label));
if (mLauncher != null) {
allAppsButton.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener());
+ mLauncher.setAllAppsButton(allAppsButton);
+ allAppsButton.setOnClickListener(mLauncher);
}
- allAppsButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(android.view.View v) {
- if (mLauncher != null) {
- mLauncher.onClickAllAppsButton(v);
- }
- }
- });
// Note: We do this to ensure that the hotseat is always laid out in the orientation of
// the hotseat in order regardless of which orientation they were added