diff options
author | Michael Jurka <mikejurka@google.com> | 2012-05-21 20:36:44 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2012-06-12 10:52:57 -0700 |
commit | 9bc8eba3338455c5d915055e8ba044981c512dfa (patch) | |
tree | 97a9e5e2ae2dc526d4542b39dda8b2049df8a35d /src/com/android/launcher2/Workspace.java | |
parent | 3abc8ed439798b7bb792b04c2d3c7f80353595a3 (diff) | |
download | android_packages_apps_Trebuchet-9bc8eba3338455c5d915055e8ba044981c512dfa.tar.gz android_packages_apps_Trebuchet-9bc8eba3338455c5d915055e8ba044981c512dfa.tar.bz2 android_packages_apps_Trebuchet-9bc8eba3338455c5d915055e8ba044981c512dfa.zip |
Clean up warnings and some private API usage
Change-Id: Ic3c0b333942bc3de130e41531017e71358bd5bfb
Diffstat (limited to 'src/com/android/launcher2/Workspace.java')
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 0192630b6..e18d8effd 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -24,7 +24,6 @@ import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.app.WallpaperManager; import android.appwidget.AppWidgetHostView; -import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProviderInfo; import android.content.ComponentName; import android.content.Context; @@ -33,7 +32,6 @@ import android.content.SharedPreferences; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; -import android.graphics.Camera; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; @@ -62,7 +60,6 @@ import com.android.launcher2.LauncherSettings.Favorites; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; import java.util.Set; /** @@ -179,11 +176,6 @@ public class Workspace extends SmoothPagedView public static final int DRAG_BITMAP_PADDING = 2; private boolean mWorkspaceFadeInAdjacentScreens; - // Camera and Matrix used to determine the final position of a neighboring CellLayout - private final Matrix mMatrix = new Matrix(); - private final Camera mCamera = new Camera(); - private final float mTempFloat2[] = new float[2]; - enum WallpaperVerticalOffset { TOP, MIDDLE, BOTTOM }; int mWallpaperWidth; int mWallpaperHeight; @@ -1179,31 +1171,6 @@ public class Workspace extends SmoothPagedView return mBackgroundAlpha; } - /** - * Due to 3D transformations, if two CellLayouts are theoretically touching each other, - * on the xy plane, when one is rotated along the y-axis, the gap between them is perceived - * as being larger. This method computes what offset the rotated view should be translated - * in order to minimize this perceived gap. - * @param degrees Angle of the view - * @param width Width of the view - * @param height Height of the view - * @return Offset to be used in a View.setTranslationX() call - */ - private float getOffsetXForRotation(float degrees, int width, int height) { - mMatrix.reset(); - mCamera.save(); - mCamera.rotateY(Math.abs(degrees)); - mCamera.getMatrix(mMatrix); - mCamera.restore(); - - mMatrix.preTranslate(-width * 0.5f, -height * 0.5f); - mMatrix.postTranslate(width * 0.5f, height * 0.5f); - mTempFloat2[0] = width; - mTempFloat2[1] = height; - mMatrix.mapPoints(mTempFloat2); - return (width - mTempFloat2[0]) * (degrees > 0.0f ? 1.0f : -1.0f); - } - float backgroundAlphaInterpolator(float r) { float pivotA = 0.1f; float pivotB = 0.4f; @@ -3573,8 +3540,6 @@ public class Workspace extends SmoothPagedView } void removeItems(final ArrayList<ApplicationInfo> apps) { - final AppWidgetManager widgets = AppWidgetManager.getInstance(getContext()); - final HashSet<String> packageNames = new HashSet<String>(); final int appCount = apps.size(); for (int i = 0; i < appCount; i++) { |