diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-01-08 16:59:04 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-01-16 17:40:41 -0800 |
commit | 71b5c0b988a64b3a0613ded5403749bc537ee8a5 (patch) | |
tree | dec5e13b1ef53a7005a9776387fc0a4c1895c39c /src/com/android/launcher3/LauncherAppState.java | |
parent | 08f7261d11a53ae4b330ad4fa897b8519de3d750 (diff) | |
download | android_packages_apps_Trebuchet-71b5c0b988a64b3a0613ded5403749bc537ee8a5.tar.gz android_packages_apps_Trebuchet-71b5c0b988a64b3a0613ded5403749bc537ee8a5.tar.bz2 android_packages_apps_Trebuchet-71b5c0b988a64b3a0613ded5403749bc537ee8a5.zip |
Adding accessibility controls
> Adding 'Remove' option to workspace items
> Adding 'Add to workspace' to all apps and widget list items, which
adds the item to the first available space, giving preference to
the current workspace screen
> Adding 'App info' and 'Uninstall' options to appropriate items
Bug: 18482913
Change-Id: Ifab7423af2d9ba502b5a2771b37bb5436b3df937
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r-- | src/com/android/launcher3/LauncherAppState.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java index b7c45a340..87e9aae15 100644 --- a/src/com/android/launcher3/LauncherAppState.java +++ b/src/com/android/launcher3/LauncherAppState.java @@ -32,10 +32,13 @@ import android.os.Handler; import android.util.DisplayMetrics; import android.util.Log; import android.view.Display; +import android.view.View.AccessibilityDelegate; import android.view.WindowManager; + import com.android.launcher3.compat.LauncherAppsCompat; import com.android.launcher3.compat.PackageInstallerCompat; import com.android.launcher3.compat.PackageInstallerCompat.PackageInstallInfo; + import java.lang.ref.WeakReference; import java.util.ArrayList; @@ -62,6 +65,7 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks { private static LauncherAppState INSTANCE; private DynamicGrid mDynamicGrid; + private AccessibilityDelegate mAccessibilityDelegate; public static LauncherAppState getInstance() { if (INSTANCE == null) { @@ -162,9 +166,15 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks { LauncherModel setLauncher(Launcher launcher) { mModel.initialize(launcher); + mAccessibilityDelegate = ((launcher != null) && Utilities.isLmpOrAbove()) ? + new LauncherAccessibilityDelegate(launcher) : null; return mModel; } + AccessibilityDelegate getAccessibilityDelegate() { + return mAccessibilityDelegate; + } + public IconCache getIconCache() { return mIconCache; } |