diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-10-16 08:58:57 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-10-16 09:02:25 -0700 |
commit | 9eba1fd75e9fa6b0dc5cad9a4e817b3b167d2461 (patch) | |
tree | cfaa5ee521f4755d291e282a4bb48f5b10918bb6 /src/com/android/launcher3/dragndrop/DragController.java | |
parent | be424b2c32a878608411bc0748bc88300046cc27 (diff) | |
download | android_packages_apps_Trebuchet-9eba1fd75e9fa6b0dc5cad9a4e817b3b167d2461.tar.gz android_packages_apps_Trebuchet-9eba1fd75e9fa6b0dc5cad9a4e817b3b167d2461.tar.bz2 android_packages_apps_Trebuchet-9eba1fd75e9fa6b0dc5cad9a4e817b3b167d2461.zip |
Refactoring WallpaperOffsetInterpolator to a new file
Removing some us unused methods
Change-Id: Ife790e5ca6848fa13dc3fab1bba1e6220bf83743
Diffstat (limited to 'src/com/android/launcher3/dragndrop/DragController.java')
-rw-r--r-- | src/com/android/launcher3/dragndrop/DragController.java | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java index a4bd753ff..d61117c0d 100644 --- a/src/com/android/launcher3/dragndrop/DragController.java +++ b/src/com/android/launcher3/dragndrop/DragController.java @@ -166,11 +166,9 @@ public class DragController implements DragDriver.EventListener { * @param bmp The bitmap that represents the view being dragged * @param source An object representing where the drag originated * @param dragInfo The data associated with the object that is being dragged + * @param viewImageBounds the position of the image inside the view * @param dragAction The drag action: either {@link #DRAG_ACTION_MOVE} or * {@link #DRAG_ACTION_COPY} - * @param viewImageBounds the position of the image inside the view - * @param dragRegion Coordinates within the bitmap b for the position of item being dragged. - * Makes dragging feel more precise, e.g. you can clip out a transparent border */ public void startDrag(View v, Bitmap bmp, DragSource source, ItemInfo dragInfo, Rect viewImageBounds, int dragAction, float initialDragViewScale) { @@ -269,44 +267,6 @@ public class DragController implements DragDriver.EventListener { } /** - * Draw the view into a bitmap. - */ - Bitmap getViewBitmap(View v) { - v.clearFocus(); - v.setPressed(false); - - boolean willNotCache = v.willNotCacheDrawing(); - v.setWillNotCacheDrawing(false); - - // Reset the drawing cache background color to fully transparent - // for the duration of this operation - int color = v.getDrawingCacheBackgroundColor(); - v.setDrawingCacheBackgroundColor(0); - float alpha = v.getAlpha(); - v.setAlpha(1.0f); - - if (color != 0) { - v.destroyDrawingCache(); - } - v.buildDrawingCache(); - Bitmap cacheBitmap = v.getDrawingCache(); - if (cacheBitmap == null) { - Log.e(TAG, "failed getViewBitmap(" + v + ")", new RuntimeException()); - return null; - } - - Bitmap bitmap = Bitmap.createBitmap(cacheBitmap); - - // Restore the view - v.destroyDrawingCache(); - v.setAlpha(alpha); - v.setWillNotCacheDrawing(willNotCache); - v.setDrawingCacheBackgroundColor(color); - - return bitmap; - } - - /** * Call this from a drag source view like this: * * <pre> |