summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/accessibility
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-11-18 23:44:48 -0800
committerSunny Goyal <sunnygoyal@google.com>2016-11-21 15:20:16 +0530
commitc13403c612748bfdf06436510600230c4c4b55ec (patch)
treeb6b8266eb906cb7f4a2c920f7924d1801de1b97e /src/com/android/launcher3/accessibility
parentaa8a871e337fe42e9339b96833eaf37bf2b64b2f (diff)
downloadandroid_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.tar.gz
android_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.tar.bz2
android_packages_apps_Trebuchet-c13403c612748bfdf06436510600230c4c4b55ec.zip
Defining various modes for CellLayout: Workspace, Hotseat & Folder
> Moving the definition of modes to xml > Defining attributes in xml Change-Id: I7a569fdbeb833d569eeeef2f2cbc8214e608ad11
Diffstat (limited to 'src/com/android/launcher3/accessibility')
-rw-r--r--src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java b/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java
index c71307d48..9a23aa813 100644
--- a/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java
+++ b/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java
@@ -57,7 +57,7 @@ public class WorkspaceAccessibilityHelper extends DragAndDropAccessibilityDelega
int y = id / mCountX;
LauncherAccessibilityDelegate.DragInfo dragInfo = mDelegate.getDragInfo();
- if (dragInfo.dragType == DragType.WIDGET && mView.isHotseat()) {
+ if (dragInfo.dragType == DragType.WIDGET && !mView.acceptsWidget()) {
return INVALID_POSITION;
}
@@ -161,11 +161,7 @@ public class WorkspaceAccessibilityHelper extends DragAndDropAccessibilityDelega
View child = mView.getChildAt(x, y);
if (child == null || child == dragInfo.item) {
- if (mView.isHotseat()) {
- return mContext.getString(R.string.move_to_hotseat_position, id + 1);
- } else {
- return mContext.getString(R.string.move_to_empty_cell, y + 1, x + 1);
- }
+ return mView.getItemMoveDescription(x, y);
} else {
return getDescriptionForDropOver(child, mContext);
}