Merge "Moving LauncherAccessibilityDelegate to accessibility package" into ub-launcher3-burnaby
This commit is contained in:
@@ -3012,7 +3012,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
// 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;
|
||||
@@ -3021,7 +3021,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
long screenId;
|
||||
long container;
|
||||
|
||||
CellInfo(View v, ItemInfo info) {
|
||||
public CellInfo(View v, ItemInfo info) {
|
||||
cell = v;
|
||||
cellX = info.cellX;
|
||||
cellY = info.cellY;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -792,7 +792,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;
|
||||
@@ -888,7 +888,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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+19
-1
@@ -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;
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user