summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-07-08 17:46:23 -0700
committerMichael Jurka <mikejurka@google.com>2011-07-08 18:03:21 -0700
commit0c4ade1ef611ea91e3f1ff2fdca4ae6982ff7804 (patch)
treea514cf1be82a4003e1408858c9e507022ffbd998 /src
parentff0e01b65dac8861d0a319fb643c67f8a573aa97 (diff)
downloadandroid_packages_apps_Trebuchet-0c4ade1ef611ea91e3f1ff2fdca4ae6982ff7804.tar.gz
android_packages_apps_Trebuchet-0c4ade1ef611ea91e3f1ff2fdca4ae6982ff7804.tar.bz2
android_packages_apps_Trebuchet-0c4ade1ef611ea91e3f1ff2fdca4ae6982ff7804.zip
Cleaning out unused lines of code
Change-Id: I558248c9e1ccf8098220b110709d2a0cba9247ea
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/CellLayout.java1
-rw-r--r--src/com/android/launcher2/Launcher.java2
-rw-r--r--src/com/android/launcher2/Workspace.java31
3 files changed, 0 insertions, 34 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index b8515fcaa..22516cc33 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -29,7 +29,6 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
-import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PointF;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 6f64f9d57..76866a7f1 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1066,7 +1066,6 @@ public final class Launcher extends Activity
if (appWidgetId != -1) {
// Deleting an app widget ID is a void call but writes to disk before returning
// to the caller...
- final LauncherAppWidgetHost appWidgetHost = mAppWidgetHost;
new Thread("deleteAppWidgetId") {
public void run() {
mAppWidgetHost.deleteAppWidgetId(appWidgetId);
@@ -2861,7 +2860,6 @@ public final class Launcher extends Activity
* Handle the action clicked in the "Add to home" dialog.
*/
public void onClick(DialogInterface dialog, int which) {
- Resources res = getResources();
cleanup();
AddAdapter.ListItem item = (AddAdapter.ListItem) mAdapter.getItem(which);
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 611d360c0..cffc456ab 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -109,16 +109,11 @@ public class Workspace extends SmoothPagedView
private float mOverScrollMaxBackgroundAlpha = 0.0f;
private int mOverScrollPageIndex = -1;
-
-
private final WallpaperManager mWallpaperManager;
private IBinder mWindowToken;
private int mDefaultPage;
- private boolean mIsDragInProcess = false;
- private boolean mIsDraggingOverIcon = false;
-
/**
* CellInfo for the cell that is currently being dragged
*/
@@ -147,9 +142,7 @@ public class Workspace extends SmoothPagedView
private float[] mTempTouchCoordinates = new float[2];
private float[] mTempCellLayoutCenterCoordinates = new float[2];
private float[] mTempDragBottomRightCoordinates = new float[2];
- private float[] mTempFloatTuple = new float[2];
private Matrix mTempInverseMatrix = new Matrix();
- private int[] mTempLocation = new int[2];
private SpringLoadedDragController mSpringLoadedDragController;
private float mSpringLoadedShrinkFactor;
@@ -172,9 +165,6 @@ public class Workspace extends SmoothPagedView
/** Is the user is dragging an item near the edge of a page? */
private boolean mInScrollArea = false;
- /** If mInScrollArea is true, the direction of the scroll. */
- private int mPendingScrollDirection = DragController.SCROLL_NONE;
-
private final HolographicOutlineHelper mOutlineHelper = new HolographicOutlineHelper();
private Bitmap mDragOutline = null;
private final Rect mTempRect = new Rect();
@@ -196,9 +186,6 @@ public class Workspace extends SmoothPagedView
boolean mSyncWallpaperOffsetWithScroll = true;
private Runnable mDelayedResizeRunnable;
- // info about the last drag
- private DragView mLastDragView;
-
// Variables relating to the creation of user folders by hovering shortcuts over shortcuts
private static final int FOLDER_CREATION_TIMEOUT = 250;
private final Alarm mFolderCreationAlarm = new Alarm();
@@ -255,10 +242,6 @@ public class Workspace extends SmoothPagedView
// TODO: This code currently fails on tablets with an aspect ratio < 1.3.
// Around that ratio we should make cells the same size in portrait and
// landscape
- final DisplayMetrics dm = res.getDisplayMetrics();
- float widthDp = dm.widthPixels / dm.density;
- float heightDp = dm.heightPixels / dm.density;
-
TypedArray actionBarSizeTypedArray =
context.obtainStyledAttributes(new int[] { android.R.attr.actionBarSize });
final float actionBarHeight = actionBarSizeTypedArray.getDimension(0, 0f);
@@ -1586,8 +1569,6 @@ public class Workspace extends SmoothPagedView
*
*/
public void onDragStartedWithItem(View v) {
- mIsDragInProcess = true;
-
final Canvas canvas = new Canvas();
// We need to add extra padding to the bitmap to make room for the glow effect
@@ -1598,8 +1579,6 @@ public class Workspace extends SmoothPagedView
}
public void onDragStartedWithItemSpans(int spanX, int spanY, Bitmap b) {
- mIsDragInProcess = true;
-
final Canvas canvas = new Canvas();
// We need to add extra padding to the bitmap to make room for the glow effect
@@ -1620,7 +1599,6 @@ public class Workspace extends SmoothPagedView
if (!success) {
doDragExit(null);
}
- mIsDragInProcess = false;
}
// We call this when we trigger an unshrink by clicking on the CellLayout cl
@@ -2311,7 +2289,6 @@ public class Workspace extends SmoothPagedView
mDragTargetLayout = getCurrentDropLayout();
mDragTargetLayout.setIsDragOverlapping(true);
mDragTargetLayout.onDragEnter();
- mLastDragView = d.dragView;
// Because we don't have space in the Phone UI (the CellLayouts run to the edge) we
// don't need to show the outlines
@@ -2331,7 +2308,6 @@ public class Workspace extends SmoothPagedView
mDragTargetLayout.setIsDragOverlapping(false);
mDragTargetLayout.onDragExit();
}
- mLastDragView = null;
mLastDragOverView = null;
if (!mIsPageMoving) {
@@ -2578,10 +2554,6 @@ public class Workspace extends SmoothPagedView
*
*/
private CellLayout findMatchingPageForDragOver(
- DragView dragView, int originX, int originY, int offsetX, int offsetY) {
- return findMatchingPageForDragOver(dragView, originX, originY, offsetX, offsetY, false);
- }
- private CellLayout findMatchingPageForDragOver(
DragView dragView, int originX, int originY, int offsetX, int offsetY, boolean exact) {
// We loop through all the screens (ie CellLayouts) and see which ones overlap
// with the item being dragged and then choose the one that's closest to the touch point
@@ -3032,7 +3004,6 @@ public class Workspace extends SmoothPagedView
public void onEnterScrollArea(int direction) {
if (!mIsSmall && !mIsInUnshrinkAnimation) {
mInScrollArea = true;
- mPendingScrollDirection = direction;
final int page = mCurrentPage + (direction == DragController.SCROLL_LEFT ? -1 : 1);
final CellLayout layout = (CellLayout) getChildAt(page);
@@ -3067,7 +3038,6 @@ public class Workspace extends SmoothPagedView
// so we need to redraw the workspace when this may have changed.
invalidate();
}
- mPendingScrollDirection = DragController.SCROLL_NONE;
mInScrollArea = false;
}
}
@@ -3081,7 +3051,6 @@ public class Workspace extends SmoothPagedView
// so we need to redraw the workspace when this may have changed.
invalidate();
}
- mPendingScrollDirection = DragController.SCROLL_NONE;
mInScrollArea = false;
}