summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java108
1 files changed, 0 insertions, 108 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 66e370b08..3de0b8e7e 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -43,7 +43,6 @@ import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.Region.Op;
import android.graphics.drawable.Drawable;
-import android.net.Uri;
import android.os.AsyncTask;
import android.os.Handler;
import android.os.IBinder;
@@ -560,10 +559,6 @@ public class Workspace extends SmoothPagedView
}
public long insertNewWorkspaceScreen(long screenId, int insertIndex) {
- // Log to disk
- Launcher.addDumpLog(TAG, "11683562 - insertNewWorkspaceScreen(): " + screenId +
- " at index: " + insertIndex, true);
-
if (mWorkspaceScreens.containsKey(screenId)) {
throw new RuntimeException("Screen id " + screenId + " already exists!");
}
@@ -663,9 +658,6 @@ public class Workspace extends SmoothPagedView
}
public void addExtraEmptyScreenOnDrag() {
- // Log to disk
- Launcher.addDumpLog(TAG, "11683562 - addExtraEmptyScreenOnDrag()", true);
-
boolean lastChildOnScreen = false;
boolean childOnFinalScreen = false;
@@ -692,9 +684,6 @@ public class Workspace extends SmoothPagedView
}
public boolean addExtraEmptyScreen() {
- // Log to disk
- Launcher.addDumpLog(TAG, "11683562 - addExtraEmptyScreen()", true);
-
if (!mWorkspaceScreens.containsKey(EXTRA_EMPTY_SCREEN_ID)) {
insertNewWorkspaceScreen(EXTRA_EMPTY_SCREEN_ID);
return true;
@@ -703,9 +692,6 @@ public class Workspace extends SmoothPagedView
}
private void convertFinalScreenToEmptyScreenIfNecessary() {
- // Log to disk
- Launcher.addDumpLog(TAG, "11683562 - convertFinalScreenToEmptyScreenIfNecessary()", true);
-
if (mLauncher.isWorkspaceLoading()) {
// Invalid and dangerous operation if workspace is loading
Launcher.addDumpLog(TAG, " - workspace loading, skip", true);
@@ -730,7 +716,6 @@ public class Workspace extends SmoothPagedView
// Update the model if we have changed any screens
mLauncher.getModel().updateWorkspaceScreenOrder(mLauncher, mScreenOrder);
- Launcher.addDumpLog(TAG, "11683562 - extra empty screen: " + finalScreenId, true);
}
}
@@ -740,8 +725,6 @@ public class Workspace extends SmoothPagedView
public void removeExtraEmptyScreenDelayed(final boolean animate, final Runnable onComplete,
final int delay, final boolean stripEmptyScreens) {
- // Log to disk
- Launcher.addDumpLog(TAG, "11683562 - removeExtraEmptyScreen()", true);
if (mLauncher.isWorkspaceLoading()) {
// Don't strip empty screens if the workspace is still loading
Launcher.addDumpLog(TAG, " - workspace loading, skip", true);
@@ -783,9 +766,7 @@ public class Workspace extends SmoothPagedView
private void fadeAndRemoveEmptyScreen(int delay, int duration, final Runnable onComplete,
final boolean stripEmptyScreens) {
- // Log to disk
// XXX: Do we need to update LM workspace screens below?
- Launcher.addDumpLog(TAG, "11683562 - fadeAndRemoveEmptyScreen()", true);
PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat("alpha", 0f);
PropertyValuesHolder bgAlpha = PropertyValuesHolder.ofFloat("backgroundAlpha", 0f);
@@ -829,8 +810,6 @@ public class Workspace extends SmoothPagedView
}
public long commitExtraEmptyScreen() {
- // Log to disk
- Launcher.addDumpLog(TAG, "11683562 - commitExtraEmptyScreen()", true);
if (mLauncher.isWorkspaceLoading()) {
// Invalid and dangerous operation if workspace is loading
Launcher.addDumpLog(TAG, " - workspace loading, skip", true);
@@ -889,9 +868,6 @@ public class Workspace extends SmoothPagedView
}
public void stripEmptyScreens() {
- // Log to disk
- Launcher.addDumpLog(TAG, "11683562 - stripEmptyScreens()", true);
-
if (mLauncher.isWorkspaceLoading()) {
// Don't strip empty screens if the workspace is still loading.
// This is dangerous and can result in data loss.
@@ -919,7 +895,6 @@ public class Workspace extends SmoothPagedView
int pageShift = 0;
for (Long id: removeScreens) {
- Launcher.addDumpLog(TAG, "11683562 - removing id: " + id, true);
CellLayout cl = mWorkspaceScreens.get(id);
mWorkspaceScreens.remove(id);
mScreenOrder.remove(id);
@@ -4104,7 +4079,6 @@ public class Workspace extends SmoothPagedView
// In the case where we've prebound the widget, we remove it from the DragLayer
if (finalView instanceof AppWidgetHostView && external) {
- Log.d(TAG, "6557954 Animate widget drop, final view is appWidgetHostView");
mLauncher.getDragLayer().removeView(finalView);
}
@@ -4295,88 +4269,6 @@ public class Workspace extends SmoothPagedView
}
}
- ArrayList<ComponentName> getUniqueComponents(boolean stripDuplicates, ArrayList<ComponentName> duplicates) {
- ArrayList<ComponentName> uniqueIntents = new ArrayList<ComponentName>();
- getUniqueIntents((CellLayout) mLauncher.getHotseat().getLayout(), uniqueIntents, duplicates, false);
- int count = getChildCount();
- for (int i = 0; i < count; i++) {
- CellLayout cl = (CellLayout) getChildAt(i);
- getUniqueIntents(cl, uniqueIntents, duplicates, false);
- }
- return uniqueIntents;
- }
-
- void getUniqueIntents(CellLayout cl, ArrayList<ComponentName> uniqueIntents,
- ArrayList<ComponentName> duplicates, boolean stripDuplicates) {
- int count = cl.getShortcutsAndWidgets().getChildCount();
-
- ArrayList<View> children = new ArrayList<View>();
- for (int i = 0; i < count; i++) {
- View v = cl.getShortcutsAndWidgets().getChildAt(i);
- children.add(v);
- }
-
- for (int i = 0; i < count; i++) {
- View v = children.get(i);
- ItemInfo info = (ItemInfo) v.getTag();
- // Null check required as the AllApps button doesn't have an item info
- if (info instanceof ShortcutInfo) {
- ShortcutInfo si = (ShortcutInfo) info;
- ComponentName cn = si.intent.getComponent();
-
- Uri dataUri = si.intent.getData();
- // If dataUri is not null / empty or if this component isn't one that would
- // have previously showed up in the AllApps list, then this is a widget-type
- // shortcut, so ignore it.
- if (dataUri != null && !dataUri.equals(Uri.EMPTY)) {
- continue;
- }
-
- if (!uniqueIntents.contains(cn)) {
- uniqueIntents.add(cn);
- } else {
- if (stripDuplicates) {
- cl.removeViewInLayout(v);
- LauncherModel.deleteItemFromDatabase(mLauncher, si);
- }
- if (duplicates != null) {
- duplicates.add(cn);
- }
- }
- }
- if (v instanceof FolderIcon) {
- FolderIcon fi = (FolderIcon) v;
- ArrayList<View> items = fi.getFolder().getItemsInReadingOrder();
- for (int j = 0; j < items.size(); j++) {
- if (items.get(j).getTag() instanceof ShortcutInfo) {
- ShortcutInfo si = (ShortcutInfo) items.get(j).getTag();
- ComponentName cn = si.intent.getComponent();
-
- Uri dataUri = si.intent.getData();
- // If dataUri is not null / empty or if this component isn't one that would
- // have previously showed up in the AllApps list, then this is a widget-type
- // shortcut, so ignore it.
- if (dataUri != null && !dataUri.equals(Uri.EMPTY)) {
- continue;
- }
-
- if (!uniqueIntents.contains(cn)) {
- uniqueIntents.add(cn);
- } else {
- if (stripDuplicates) {
- fi.getFolderInfo().remove(si);
- LauncherModel.deleteItemFromDatabase(mLauncher, si);
- }
- if (duplicates != null) {
- duplicates.add(cn);
- }
- }
- }
- }
- }
- }
- }
-
void saveWorkspaceToDb() {
saveWorkspaceScreenToDb((CellLayout) mLauncher.getHotseat().getLayout());
int count = getChildCount();