Moving LauncherAccessibilityDelegate to Launcher to associate it with
activity lifecycle.
Change-Id: Ib815505677fa7ed74bdcfe7141b1d9bea5d7143a
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index d768ea8..156c1b0 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -92,6 +92,7 @@
import com.android.launcher3.DropTarget.DragObject;
import com.android.launcher3.LauncherSettings.Favorites;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.allapps.AllAppsContainerView;
import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.allapps.DefaultAppSearchController;
@@ -286,6 +287,7 @@
private LauncherModel mModel;
private IconCache mIconCache;
private ExtractedColors mExtractedColors;
+ private LauncherAccessibilityDelegate mAccessibilityDelegate;
@Thunk boolean mUserPresent = true;
private boolean mVisible = false;
private boolean mHasFocus = false;
@@ -414,6 +416,7 @@
mIsSafeModeEnabled = getPackageManager().isSafeMode();
mModel = app.setLauncher(this);
mIconCache = app.getIconCache();
+ mAccessibilityDelegate = new LauncherAccessibilityDelegate(this);
mDragController = new DragController(this);
mAllAppsController = new AllAppsTransitionController(this);
@@ -1999,6 +2002,10 @@
}
}
+ public LauncherAccessibilityDelegate getAccessibilityDelegate() {
+ return mAccessibilityDelegate;
+ }
+
public DragController getDragController() {
return mDragController;
}