summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-05-19 12:52:12 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-05-19 12:52:30 -0700
commit83a8f042adda926489494dff217c15ab696139b4 (patch)
treed4848fc86fc9809b0d3f294ece1b4039fa085009 /src/com/android/launcher3
parent6cfad01b1cace11a3fe523cebe5dde987f148585 (diff)
downloadandroid_packages_apps_Trebuchet-83a8f042adda926489494dff217c15ab696139b4.tar.gz
android_packages_apps_Trebuchet-83a8f042adda926489494dff217c15ab696139b4.tar.bz2
android_packages_apps_Trebuchet-83a8f042adda926489494dff217c15ab696139b4.zip
Moving LauncherAccessibilityDelegate to accessibility package
Change-Id: I510204a5a12abf2da2757f3e3f8b0e8869a6b04a
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/CellLayout.java4
-rw-r--r--src/com/android/launcher3/DragLayer.java1
-rw-r--r--src/com/android/launcher3/Folder.java6
-rw-r--r--src/com/android/launcher3/Launcher.java5
-rw-r--r--src/com/android/launcher3/LauncherAppState.java1
-rw-r--r--src/com/android/launcher3/LauncherModel.java4
-rw-r--r--src/com/android/launcher3/PagedView.java4
-rw-r--r--src/com/android/launcher3/SmoothPagedView.java2
-rw-r--r--src/com/android/launcher3/Workspace.java9
-rw-r--r--src/com/android/launcher3/accessibility/DragAndDropAccessibilityDelegate.java1
-rw-r--r--src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java (renamed from src/com/android/launcher3/LauncherAccessibilityDelegate.java)20
-rw-r--r--src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java3
12 files changed, 42 insertions, 18 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index a348008d8..a6e11b683 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -3010,7 +3010,7 @@ public class CellLayout extends ViewGroup {
// 2. When long clicking on an empty cell in a CellLayout, we save information about the
// cellX and cellY coordinates and which page was clicked. We then set this as a tag on
// the CellLayout that was long clicked
- static final class CellInfo {
+ public static final class CellInfo {
View cell;
int cellX = -1;
int cellY = -1;
@@ -3019,7 +3019,7 @@ public class CellLayout extends ViewGroup {
long screenId;
long container;
- CellInfo(View v, ItemInfo info) {
+ public CellInfo(View v, ItemInfo info) {
cell = v;
cellX = info.cellX;
cellY = info.cellY;
diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java
index e25e6152c..e8661e331 100644
--- a/src/com/android/launcher3/DragLayer.java
+++ b/src/com/android/launcher3/DragLayer.java
@@ -39,6 +39,7 @@ import android.view.animation.Interpolator;
import android.widget.FrameLayout;
import android.widget.TextView;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.util.Thunk;
import java.util.ArrayList;
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 69b18374a..d0a7ba3f8 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -49,13 +49,15 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.LinearLayout;
import android.widget.TextView;
+
import com.android.launcher3.CellLayout.CellInfo;
import com.android.launcher3.DragController.DragListener;
import com.android.launcher3.FolderInfo.FolderListener;
-import com.android.launcher3.LauncherAccessibilityDelegate.AccessibilityDragSource;
import com.android.launcher3.UninstallDropTarget.UninstallSource;
import com.android.launcher3.Workspace.ItemOperator;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate.AccessibilityDragSource;
import com.android.launcher3.util.Thunk;
+
import java.util.ArrayList;
import java.util.Collections;
@@ -352,7 +354,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
/**
* @return the FolderInfo object associated with this folder
*/
- FolderInfo getInfo() {
+ public FolderInfo getInfo() {
return mInfo;
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 51ba2dfc9..7b7b61795 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -96,6 +96,7 @@ import android.widget.Toast;
import com.android.launcher3.DropTarget.DragObject;
import com.android.launcher3.PagedView.PageSwitchListener;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.compat.AppWidgetManagerCompat;
import com.android.launcher3.compat.LauncherActivityInfoCompat;
import com.android.launcher3.compat.LauncherAppsCompat;
@@ -3184,7 +3185,7 @@ public class Launcher extends Activity
}
}
- void closeFolder(Folder folder) {
+ public void closeFolder(Folder folder) {
folder.getInfo().opened = false;
ViewGroup parent = (ViewGroup) folder.getParent().getParent();
@@ -3337,7 +3338,7 @@ public class Launcher extends Activity
true);
}
- protected void showWorkspace(boolean animated, Runnable onCompleteRunnable) {
+ public void showWorkspace(boolean animated, Runnable onCompleteRunnable) {
showWorkspace(WorkspaceStateTransitionAnimation.SCROLL_TO_CURRENT_PAGE, animated,
onCompleteRunnable, true);
}
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index bde54c335..f540eb47d 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -31,6 +31,7 @@ import android.util.Log;
import android.view.Display;
import android.view.WindowManager;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.compat.LauncherAppsCompat;
import com.android.launcher3.compat.PackageInstallerCompat;
import com.android.launcher3.util.Thunk;
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 0b3049c2e..635c86320 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -793,7 +793,7 @@ public class LauncherModel extends BroadcastReceiver
/**
* Move an item in the DB to a new <container, screen, cellX, cellY>
*/
- static void moveItemInDatabase(Context context, final ItemInfo item, final long container,
+ public static void moveItemInDatabase(Context context, final ItemInfo item, final long container,
final long screenId, final int cellX, final int cellY) {
item.container = container;
item.cellX = cellX;
@@ -889,7 +889,7 @@ public class LauncherModel extends BroadcastReceiver
/**
* Update an item to the database in a specified container.
*/
- static void updateItemInDatabase(Context context, final ItemInfo item) {
+ public static void updateItemInDatabase(Context context, final ItemInfo item) {
final ContentValues values = new ContentValues();
item.onAddToDatabase(context, values);
updateItemInDatabaseHelper(context, values, item, "updateItemInDatabase");
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 554a975e7..62f1bc9d7 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -407,7 +407,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
/**
* Returns the index of the currently displayed page.
*/
- int getCurrentPage() {
+ public int getCurrentPage() {
return mCurrentPage;
}
@@ -422,7 +422,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
return getChildCount();
}
- View getPageAt(int index) {
+ public View getPageAt(int index) {
return getChildAt(index);
}
diff --git a/src/com/android/launcher3/SmoothPagedView.java b/src/com/android/launcher3/SmoothPagedView.java
index 4e331aa2c..0f9b23cda 100644
--- a/src/com/android/launcher3/SmoothPagedView.java
+++ b/src/com/android/launcher3/SmoothPagedView.java
@@ -152,7 +152,7 @@ public abstract class SmoothPagedView extends PagedView {
}
@Override
- protected void snapToPage(int whichPage) {
+ public void snapToPage(int whichPage) {
if (mScrollMode == X_LARGE_MODE) {
super.snapToPage(whichPage);
} else {
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 58e5877a6..8c1c7d689 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -57,19 +57,22 @@ import android.view.accessibility.AccessibilityManager;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.TextView;
+
import com.android.launcher3.FolderIcon.FolderRingAnimator;
import com.android.launcher3.Launcher.CustomContentCallbacks;
import com.android.launcher3.Launcher.LauncherOverlay;
-import com.android.launcher3.LauncherAccessibilityDelegate.AccessibilityDragSource;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.UninstallDropTarget.UninstallSource;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.accessibility.OverviewScreenAccessibilityDelegate;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate.AccessibilityDragSource;
import com.android.launcher3.compat.UserHandleCompat;
import com.android.launcher3.util.LongArrayMap;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.util.WallpaperUtils;
import com.android.launcher3.widget.PendingAddShortcutInfo;
import com.android.launcher3.widget.PendingAddWidgetInfo;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -494,7 +497,7 @@ public class Workspace extends SmoothPagedView
/**
* @return The open folder on the current screen, or null if there is none
*/
- Folder getOpenFolder() {
+ public Folder getOpenFolder() {
DragLayer dragLayer = mLauncher.getDragLayer();
int count = dragLayer.getChildCount();
for (int i = 0; i < count; i++) {
@@ -857,7 +860,7 @@ public class Workspace extends SmoothPagedView
return -1;
}
- ArrayList<Long> getScreenOrder() {
+ public ArrayList<Long> getScreenOrder() {
return mScreenOrder;
}
diff --git a/src/com/android/launcher3/accessibility/DragAndDropAccessibilityDelegate.java b/src/com/android/launcher3/accessibility/DragAndDropAccessibilityDelegate.java
index 0f1724155..78accf720 100644
--- a/src/com/android/launcher3/accessibility/DragAndDropAccessibilityDelegate.java
+++ b/src/com/android/launcher3/accessibility/DragAndDropAccessibilityDelegate.java
@@ -26,7 +26,6 @@ import android.view.View.OnClickListener;
import android.view.accessibility.AccessibilityEvent;
import com.android.launcher3.CellLayout;
-import com.android.launcher3.LauncherAccessibilityDelegate;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
diff --git a/src/com/android/launcher3/LauncherAccessibilityDelegate.java b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
index 3992e6390..eeec8c580 100644
--- a/src/com/android/launcher3/LauncherAccessibilityDelegate.java
+++ b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
@@ -1,4 +1,4 @@
-package com.android.launcher3;
+package com.android.launcher3.accessibility;
import android.annotation.TargetApi;
import android.app.AlertDialog;
@@ -16,6 +16,24 @@ import android.view.View.AccessibilityDelegate;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
+import com.android.launcher3.AppInfo;
+import com.android.launcher3.AppWidgetResizeFrame;
+import com.android.launcher3.CellLayout;
+import com.android.launcher3.DeleteDropTarget;
+import com.android.launcher3.Folder;
+import com.android.launcher3.FolderInfo;
+import com.android.launcher3.InfoDropTarget;
+import com.android.launcher3.ItemInfo;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherAppWidgetHostView;
+import com.android.launcher3.LauncherAppWidgetInfo;
+import com.android.launcher3.LauncherModel;
+import com.android.launcher3.LauncherSettings;
+import com.android.launcher3.PendingAddItemInfo;
+import com.android.launcher3.R;
+import com.android.launcher3.ShortcutInfo;
+import com.android.launcher3.UninstallDropTarget;
+import com.android.launcher3.Workspace;
import com.android.launcher3.util.Thunk;
import java.util.ArrayList;
diff --git a/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java b/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java
index 6f89d0eb0..80ddc13b7 100644
--- a/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java
+++ b/src/com/android/launcher3/accessibility/WorkspaceAccessibilityHelper.java
@@ -23,8 +23,7 @@ import com.android.launcher3.AppInfo;
import com.android.launcher3.CellLayout;
import com.android.launcher3.FolderInfo;
import com.android.launcher3.ItemInfo;
-import com.android.launcher3.LauncherAccessibilityDelegate;
-import com.android.launcher3.LauncherAccessibilityDelegate.DragType;
+import com.android.launcher3.accessibility.LauncherAccessibilityDelegate.DragType;
import com.android.launcher3.R;
import com.android.launcher3.ShortcutInfo;