Merge "Adjusting grid for tablets and fixing incorrect resources for large tablets." into jb-ub-now-kermit
diff --git a/Android.mk b/Android.mk
index 3bd20a7..840b161 100644
--- a/Android.mk
+++ b/Android.mk
@@ -26,8 +26,12 @@
 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src) \
+    $(call all-java-files-under, wallpaper_picker_src) \
     $(call all-renderscript-files-under, src) \
     $(call all-proto-files-under, protos)
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/wallpaper_picker_res $(LOCAL_PATH)/res
+
+LOCAL_AAPT_FLAGS := --auto-add-overlay
 
 LOCAL_PROTOC_OPTIMIZE_TYPE := nano
 LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/
@@ -57,6 +61,28 @@
 LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/
 
 LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE := protoutil
+LOCAL_MODULE := launcher_protoutil_lib
+LOCAL_IS_HOST_MODULE := true
+LOCAL_JAR_MANIFEST := util/etc/manifest.txt
+LOCAL_STATIC_JAVA_LIBRARIES := host-libprotobuf-java-2.3.0-nano
 
 include $(BUILD_HOST_JAVA_LIBRARY)
+
+#
+# Protocol Buffer Debug Utility Wrapper Script
+#
+include $(CLEAR_VARS)
+LOCAL_IS_HOST_MODULE := true
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE := launcher_protoutil
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): launcher_protoutil_lib
+$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/util/etc/launcher_protoutil | $(ACP)
+	@echo "Copy: $(PRIVATE_MODULE) ($@)"
+	$(copy-file-to-new-target)
+	$(hide) chmod 755 $@
+
+INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
diff --git a/CleanSpec.mk b/CleanSpec.mk
index c132395..b2c5266 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -50,6 +50,8 @@
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Launcher2_intermediates)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Launcher2_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Launcher2.apk)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Launcher2_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Launcher2.apk)
 
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 01227e1..9ae155b 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -21,10 +21,6 @@
     <dimen name="toolbar_button_vertical_padding">8dip</dimen>
     <dimen name="toolbar_button_horizontal_padding">8dip</dimen>
 
-    <!-- dimensions for the wallpaper picker wallpaper thumbnail width -->
-    <dimen name="wallpaper_chooser_grid_width">196dp</dimen>
-    <dimen name="wallpaper_chooser_grid_height">140dp</dimen>
-
     <!-- When dragging items on the workspace, the number of dps by which the position of
      the drag view should be offset from the position of the original view. -->
     <dimen name="dragViewOffsetX">0dp</dimen>
diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml
index 9738a12..e1f9ab4 100644
--- a/res/values-sw720dp/styles.xml
+++ b/res/values-sw720dp/styles.xml
@@ -51,12 +51,6 @@
     </style>
 
 <!-- Workspace -->
-    <style name="Theme" parent="android:Theme.Holo.Wallpaper.NoTitleBar">
-        <item name="android:windowActionModeOverlay">true</item>
-        <item name="android:windowTranslucentStatus">true</item>
-        <item name="android:windowTranslucentNavigation">true</item>
-    </style>
-
     <style name="TabIndicator.AppsCustomize">
         <item name="android:paddingStart">32dp</item>
         <item name="android:paddingEnd">32dp</item>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index c073903..ffee05f 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -32,7 +32,6 @@
     <color name="workspace_icon_text_color">#FFF</color>
 
     <color name="apps_customize_icon_text_color">#FFF</color>
-    <color name="wallpaper_picker_translucent_gray">#66000000</color>
     <color name="folder_items_text_color">#FF333333</color>
     <color name="folder_items_glow_color">#FFCCCCCC</color>
     <color name="outline_color">#FFFFFFFF</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c86fe31..28b6a5b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -27,11 +27,6 @@
     <dimen name="dynamic_grid_overview_max_icon_zone_height">120dp</dimen>
     <dimen name="dynamic_grid_overview_bar_max_width">280dp</dimen>
 
-<!-- Wallpaper picker -->
-    <dimen name="wallpaperThumbnailWidth">106.5dp</dimen>
-    <dimen name="wallpaperThumbnailHeight">94.5dp</dimen>
-    <dimen name="wallpaperItemIconSize">32dp</dimen>
-
 <!-- Cling -->
     <dimen name="clingPunchThroughGraphicCenterRadius">94dp</dimen>
     <dimen name="folderClingMarginTop">20dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 30f4d8f..361be7b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -28,38 +28,6 @@
     <string name="uid_name">Android Core Apps</string>
     <!-- Default folder name -->
     <string name="folder_name"></string>
-    <!-- Button label on Wallpaper picker screen; user selects this button to set a specific wallpaper -->
-    <string name="wallpaper_instructions">Set wallpaper</string>
-    <!-- Error message when an image is selected as a wallpaper,
-         but the wallpaper picker cannot load it -->
-    <string name="image_load_fail">Coudn\'t load image</string>
-    <!-- Error message when an image is selected as a wallpaper,
-         but the wallpaper cropper cannot load it. The user will
-         usually see this when using another app and trying to set
-         an image as the wallpaper -->
-    <string name="wallpaper_load_fail">Couldn\'t load image as wallpaper</string>
-    <!-- Shown when wallpapers are selected in Wallpaper picker -->
-    <!-- String indicating how many media item(s) is(are) selected
-            eg. 1 selected [CHAR LIMIT=30] -->
-    <plurals name="number_of_items_selected">
-        <item quantity="zero">%1$d selected</item>
-        <item quantity="one">%1$d selected</item>
-        <item quantity="other">%1$d selected</item>
-    </plurals>
-    <!-- Accessibility string used as a label for a particular wallpaper in the Wallpaper Picker list.
-         e.g. "Wallpaper 3 of 10" -->
-    <string name="wallpaper_accessibility_name">Wallpaper %1$d of %2$d</string>
-    <!-- Accessibility string used to announce that a wallpaper has been selected. -->
-    <string name="announce_selection">Selected <xliff:g id="label" example="Wallpaper 3 of 10">%1$s</xliff:g></string>
-
-    <!-- Label on button to delete wallpaper(s) -->
-    <string name="wallpaper_delete">Delete</string>
-    <!-- Label on button in Wallpaper Picker to pick an image -->
-    <string name="pick_image">Pick image</string>
-    <!-- Option in "Select wallpaper from" dialog box -->
-    <string name="pick_wallpaper">Wallpapers</string>
-    <!-- Title of activity for cropping wallpapers -->
-    <string name="crop_wallpaper">Crop wallpaper</string>
     <!-- Displayed when user selects a shortcut for an app that was uninstalled [CHAR_LIMIT=none]-->
     <string name="activity_not_found">App isn\'t installed.</string>
     <!--  Labels for the tabs in the customize drawer -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8226915..4aad5eb 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,23 +18,6 @@
 -->
 
 <resources>
-    <style name="Theme.WallpaperCropper" parent="@android:style/Theme.Holo">
-        <item name="android:actionBarStyle">@style/WallpaperCropperActionBar</item>
-        <item name="android:windowFullscreen">true</item>
-        <item name="android:windowActionBarOverlay">true</item>
-        <item name="android:windowTranslucentNavigation">true</item>
-    </style>
-
-    <style name="WallpaperCropperActionBar" parent="android:style/Widget.Holo.ActionBar">
-        <item name="android:displayOptions">showCustom</item>
-        <item name="android:background">#88000000</item>
-    </style>
-
-    <style name="Theme" parent="@android:style/Theme.Holo.Wallpaper.NoTitleBar">
-        <item name="android:windowTranslucentStatus">true</item>
-        <item name="android:windowTranslucentNavigation">true</item>
-    </style>
-
     <style name="ClingButton">
         <item name="android:layout_width">wrap_content</item>
         <item name="android:layout_height">wrap_content</item>
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index c5ad30a..05e31af 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -134,8 +134,8 @@
 
     private HashMap<CellLayout.LayoutParams, Animator> mReorderAnimators = new
             HashMap<CellLayout.LayoutParams, Animator>();
-    private HashMap<View, ReorderHintAnimation>
-            mShakeAnimators = new HashMap<View, ReorderHintAnimation>();
+    private HashMap<View, ReorderPreviewAnimation>
+            mShakeAnimators = new HashMap<View, ReorderPreviewAnimation>();
 
     private boolean mItemPlacementDirty = false;
 
@@ -150,19 +150,20 @@
     private boolean mIsHotseat = false;
     private float mHotseatScale = 1f;
 
-    public static final int MODE_DRAG_OVER = 0;
-    public static final int MODE_ON_DROP = 1;
-    public static final int MODE_ON_DROP_EXTERNAL = 2;
-    public static final int MODE_ACCEPT_DROP = 3;
+    public static final int MODE_SHOW_REORDER_HINT = 0;
+    public static final int MODE_DRAG_OVER = 1;
+    public static final int MODE_ON_DROP = 2;
+    public static final int MODE_ON_DROP_EXTERNAL = 3;
+    public static final int MODE_ACCEPT_DROP = 4;
     private static final boolean DESTRUCTIVE_REORDER = false;
     private static final boolean DEBUG_VISUALIZE_OCCUPIED = false;
 
     static final int LANDSCAPE = 0;
     static final int PORTRAIT = 1;
 
-    private static final float REORDER_HINT_MAGNITUDE = 0.12f;
+    private static final float REORDER_PREVIEW_MAGNITUDE = 0.12f;
     private static final int REORDER_ANIMATION_DURATION = 150;
-    private float mReorderHintAnimationMagnitude;
+    private float mReorderPreviewAnimationMagnitude;
 
     private ArrayList<View> mIntersectingViews = new ArrayList<View>();
     private Rect mOccupiedRect = new Rect();
@@ -226,7 +227,7 @@
         mForegroundPadding =
                 res.getDimensionPixelSize(R.dimen.workspace_overscroll_drawable_padding);
 
-        mReorderHintAnimationMagnitude = (REORDER_HINT_MAGNITUDE *
+        mReorderPreviewAnimationMagnitude = (REORDER_PREVIEW_MAGNITUDE *
                 grid.iconSizePx);
 
         mNormalBackground.setFilterBitmap(true);
@@ -2093,6 +2094,8 @@
             }
         }
 
+        solution.intersectingViews = new ArrayList<View>(mIntersectingViews);
+
         // First we try to find a solution which respects the push mechanic. That is,
         // we try to find a solution such that no displaced item travels through another item
         // without also displacing that item.
@@ -2141,8 +2144,9 @@
         }
     }
 
-    ItemConfiguration simpleSwap(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX,
-            int spanY, int[] direction, View dragView, boolean decX, ItemConfiguration solution) {
+    ItemConfiguration findReorderSolution(int pixelX, int pixelY, int minSpanX, int minSpanY,
+            int spanX, int spanY, int[] direction, View dragView, boolean decX,
+            ItemConfiguration solution) {
         // Copy the current state into the solution. This solution will be manipulated as necessary.
         copyCurrentStateToSolution(solution, false);
         // Copy the current occupied array into the temporary occupied array. This array will be
@@ -2164,11 +2168,11 @@
             // We try shrinking the widget down to size in an alternating pattern, shrink 1 in
             // x, then 1 in y etc.
             if (spanX > minSpanX && (minSpanY == spanY || decX)) {
-                return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX - 1, spanY, direction,
-                        dragView, false, solution);
+                return findReorderSolution(pixelX, pixelY, minSpanX, minSpanY, spanX - 1, spanY,
+                        direction, dragView, false, solution);
             } else if (spanY > minSpanY) {
-                return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY - 1, direction,
-                        dragView, true, solution);
+                return findReorderSolution(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY - 1,
+                        direction, dragView, true, solution);
             }
             solution.isSolution = false;
         } else {
@@ -2248,25 +2252,30 @@
         }
     }
 
-    // This method starts or changes the reorder hint animations
-    private void beginOrAdjustHintAnimations(ItemConfiguration solution, View dragView, int delay) {
+
+    // This method starts or changes the reorder preview animations
+    private void beginOrAdjustReorderPreviewAnimations(ItemConfiguration solution,
+            View dragView, int delay, int mode) {
         int childCount = mShortcutsAndWidgets.getChildCount();
         for (int i = 0; i < childCount; i++) {
             View child = mShortcutsAndWidgets.getChildAt(i);
             if (child == dragView) continue;
             CellAndSpan c = solution.map.get(child);
+            boolean skip = mode == ReorderPreviewAnimation.MODE_HINT && solution.intersectingViews
+                    != null && !solution.intersectingViews.contains(child);
+
             LayoutParams lp = (LayoutParams) child.getLayoutParams();
-            if (c != null) {
-                ReorderHintAnimation rha = new ReorderHintAnimation(child, lp.cellX, lp.cellY,
-                        c.x, c.y, c.spanX, c.spanY);
+            if (c != null && !skip) {
+                ReorderPreviewAnimation rha = new ReorderPreviewAnimation(child, mode, lp.cellX,
+                        lp.cellY, c.x, c.y, c.spanX, c.spanY);
                 rha.animate();
             }
         }
     }
 
-    // Class which represents the reorder hint animations. These animations show that an item is
+    // Class which represents the reorder preview animations. These animations show that an item is
     // in a temporary state, and hint at where the item will return to.
-    class ReorderHintAnimation {
+    class ReorderPreviewAnimation {
         View child;
         float finalDeltaX;
         float finalDeltaY;
@@ -2274,11 +2283,18 @@
         float initDeltaY;
         float finalScale;
         float initScale;
-        private static final int DURATION = 300;
+        int mode;
+        boolean repeating = false;
+        private static final int PREVIEW_DURATION = 300;
+        private static final int HINT_DURATION = Workspace.REORDER_TIMEOUT;
+
+        public static final int MODE_HINT = 0;
+        public static final int MODE_PREVIEW = 1;
+
         Animator a;
 
-        public ReorderHintAnimation(View child, int cellX0, int cellY0, int cellX1, int cellY1,
-                int spanX, int spanY) {
+        public ReorderPreviewAnimation(View child, int mode, int cellX0, int cellY0, int cellX1,
+                int cellY1, int spanX, int spanY) {
             regionToCenterPoint(cellX0, cellY0, spanX, spanY, mTmpPoint);
             final int x0 = mTmpPoint[0];
             final int y0 = mTmpPoint[1];
@@ -2289,20 +2305,22 @@
             final int dY = y1 - y0;
             finalDeltaX = 0;
             finalDeltaY = 0;
+            int dir = mode == MODE_HINT ? -1 : 1;
             if (dX == dY && dX == 0) {
             } else {
                 if (dY == 0) {
-                    finalDeltaX = - Math.signum(dX) * mReorderHintAnimationMagnitude;
+                    finalDeltaX = - dir * Math.signum(dX) * mReorderPreviewAnimationMagnitude;
                 } else if (dX == 0) {
-                    finalDeltaY = - Math.signum(dY) * mReorderHintAnimationMagnitude;
+                    finalDeltaY = - dir * Math.signum(dY) * mReorderPreviewAnimationMagnitude;
                 } else {
                     double angle = Math.atan( (float) (dY) / dX);
-                    finalDeltaX = (int) (- Math.signum(dX) *
-                            Math.abs(Math.cos(angle) * mReorderHintAnimationMagnitude));
-                    finalDeltaY = (int) (- Math.signum(dY) *
-                            Math.abs(Math.sin(angle) * mReorderHintAnimationMagnitude));
+                    finalDeltaX = (int) (- dir * Math.signum(dX) *
+                            Math.abs(Math.cos(angle) * mReorderPreviewAnimationMagnitude));
+                    finalDeltaY = (int) (- dir * Math.signum(dY) *
+                            Math.abs(Math.sin(angle) * mReorderPreviewAnimationMagnitude));
                 }
             }
+            this.mode = mode;
             initDeltaX = child.getTranslationX();
             initDeltaY = child.getTranslationY();
             finalScale = getChildrenScale() - 4.0f / child.getWidth();
@@ -2312,7 +2330,7 @@
 
         void animate() {
             if (mShakeAnimators.containsKey(child)) {
-                ReorderHintAnimation oldAnimation = mShakeAnimators.get(child);
+                ReorderPreviewAnimation oldAnimation = mShakeAnimators.get(child);
                 oldAnimation.cancel();
                 mShakeAnimators.remove(child);
                 if (finalDeltaX == 0 && finalDeltaY == 0) {
@@ -2327,14 +2345,15 @@
             a = va;
             va.setRepeatMode(ValueAnimator.REVERSE);
             va.setRepeatCount(ValueAnimator.INFINITE);
-            va.setDuration(DURATION);
+            va.setDuration(mode == MODE_HINT ? HINT_DURATION : PREVIEW_DURATION);
             va.setStartDelay((int) (Math.random() * 60));
             va.addUpdateListener(new AnimatorUpdateListener() {
                 @Override
                 public void onAnimationUpdate(ValueAnimator animation) {
                     float r = ((Float) animation.getAnimatedValue()).floatValue();
-                    float x = r * finalDeltaX + (1 - r) * initDeltaX;
-                    float y = r * finalDeltaY + (1 - r) * initDeltaY;
+                    float r1 = (mode == MODE_HINT && repeating) ? 1.0f : r;
+                    float x = r1 * finalDeltaX + (1 - r1) * initDeltaX;
+                    float y = r1 * finalDeltaY + (1 - r1) * initDeltaY;
                     child.setTranslationX(x);
                     child.setTranslationY(y);
                     float s = r * finalScale + (1 - r) * initScale;
@@ -2348,6 +2367,7 @@
                     initDeltaX = 0;
                     initDeltaY = 0;
                     initScale = getChildrenScale();
+                    repeating = true;
                 }
             });
             mShakeAnimators.put(child, this);
@@ -2379,8 +2399,8 @@
         }
     }
 
-    private void completeAndClearReorderHintAnimations() {
-        for (ReorderHintAnimation a: mShakeAnimators.values()) {
+    private void completeAndClearReorderPreviewAnimations() {
+        for (ReorderPreviewAnimation a: mShakeAnimators.values()) {
             a.completeAnimationImmediately();
         }
         mShakeAnimators.clear();
@@ -2523,20 +2543,21 @@
     }
 
     void revertTempState() {
-        if (!isItemPlacementDirty() || DESTRUCTIVE_REORDER) return;
-        final int count = mShortcutsAndWidgets.getChildCount();
-        for (int i = 0; i < count; i++) {
-            View child = mShortcutsAndWidgets.getChildAt(i);
-            LayoutParams lp = (LayoutParams) child.getLayoutParams();
-            if (lp.tmpCellX != lp.cellX || lp.tmpCellY != lp.cellY) {
-                lp.tmpCellX = lp.cellX;
-                lp.tmpCellY = lp.cellY;
-                animateChildToPosition(child, lp.cellX, lp.cellY, REORDER_ANIMATION_DURATION,
-                        0, false, false);
+        completeAndClearReorderPreviewAnimations();
+        if (isItemPlacementDirty() && !DESTRUCTIVE_REORDER) {
+            final int count = mShortcutsAndWidgets.getChildCount();
+            for (int i = 0; i < count; i++) {
+                View child = mShortcutsAndWidgets.getChildAt(i);
+                LayoutParams lp = (LayoutParams) child.getLayoutParams();
+                if (lp.tmpCellX != lp.cellX || lp.tmpCellY != lp.cellY) {
+                    lp.tmpCellX = lp.cellX;
+                    lp.tmpCellY = lp.cellY;
+                    animateChildToPosition(child, lp.cellX, lp.cellY, REORDER_ANIMATION_DURATION,
+                            0, false, false);
+                }
             }
+            setItemPlacementDirty(false);
         }
-        completeAndClearReorderHintAnimations();
-        setItemPlacementDirty(false);
     }
 
     boolean createAreaForResize(int cellX, int cellY, int spanX, int spanY,
@@ -2545,7 +2566,7 @@
         regionToCenterPoint(cellX, cellY, spanX, spanY, pixelXY);
 
         // First we determine if things have moved enough to cause a different layout
-        ItemConfiguration swapSolution = simpleSwap(pixelXY[0], pixelXY[1], spanX, spanY,
+        ItemConfiguration swapSolution = findReorderSolution(pixelXY[0], pixelXY[1], spanX, spanY,
                  spanX,  spanY, direction, dragView,  true,  new ItemConfiguration());
 
         setUseTempCoords(true);
@@ -2559,18 +2580,18 @@
 
             if (commit) {
                 commitTempPlacement();
-                completeAndClearReorderHintAnimations();
+                completeAndClearReorderPreviewAnimations();
                 setItemPlacementDirty(false);
             } else {
-                beginOrAdjustHintAnimations(swapSolution, dragView,
-                        REORDER_ANIMATION_DURATION);
+                beginOrAdjustReorderPreviewAnimations(swapSolution, dragView,
+                        REORDER_ANIMATION_DURATION, ReorderPreviewAnimation.MODE_PREVIEW);
             }
             mShortcutsAndWidgets.requestLayout();
         }
         return swapSolution.isSolution;
     }
 
-    int[] createArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
+    int[] performReorder(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
             View dragView, int[] result, int resultSpan[], int mode) {
         // First we determine if things have moved enough to cause a different layout
         result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
@@ -2597,7 +2618,8 @@
             mPreviousReorderDirection[1] = mDirectionVector[1];
         }
 
-        ItemConfiguration swapSolution = simpleSwap(pixelX, pixelY, minSpanX, minSpanY,
+        // Find a solution involving pushing / displacing any items in the way
+        ItemConfiguration swapSolution = findReorderSolution(pixelX, pixelY, minSpanX, minSpanY,
                  spanX,  spanY, mDirectionVector, dragView,  true,  new ItemConfiguration());
 
         // We attempt the approach which doesn't shuffle views at all
@@ -2605,12 +2627,29 @@
                 minSpanY, spanX, spanY, dragView, new ItemConfiguration());
 
         ItemConfiguration finalSolution = null;
+
+        // If the reorder solution requires resizing (shrinking) the item being dropped, we instead
+        // favor a solution in which the item is not resized, but
         if (swapSolution.isSolution && swapSolution.area() >= noShuffleSolution.area()) {
             finalSolution = swapSolution;
         } else if (noShuffleSolution.isSolution) {
             finalSolution = noShuffleSolution;
         }
 
+        if (mode == MODE_SHOW_REORDER_HINT) {
+            if (finalSolution != null) {
+                beginOrAdjustReorderPreviewAnimations(finalSolution, dragView, 0,
+                        ReorderPreviewAnimation.MODE_HINT);
+                result[0] = finalSolution.dragViewX;
+                result[1] = finalSolution.dragViewY;
+                resultSpan[0] = finalSolution.dragViewSpanX;
+                resultSpan[1] = finalSolution.dragViewSpanY;
+            } else {
+                result[0] = result[1] = resultSpan[0] = resultSpan[1] = -1;
+            }
+            return result;
+        }
+
         boolean foundSolution = true;
         if (!DESTRUCTIVE_REORDER) {
             setUseTempCoords(true);
@@ -2635,11 +2674,11 @@
                 if (!DESTRUCTIVE_REORDER &&
                         (mode == MODE_ON_DROP || mode == MODE_ON_DROP_EXTERNAL)) {
                     commitTempPlacement();
-                    completeAndClearReorderHintAnimations();
+                    completeAndClearReorderPreviewAnimations();
                     setItemPlacementDirty(false);
                 } else {
-                    beginOrAdjustHintAnimations(finalSolution, dragView,
-                            REORDER_ANIMATION_DURATION);
+                    beginOrAdjustReorderPreviewAnimations(finalSolution, dragView,
+                            REORDER_ANIMATION_DURATION,  ReorderPreviewAnimation.MODE_PREVIEW);
                 }
             }
         } else {
@@ -2666,6 +2705,7 @@
         HashMap<View, CellAndSpan> map = new HashMap<View, CellAndSpan>();
         private HashMap<View, CellAndSpan> savedMap = new HashMap<View, CellAndSpan>();
         ArrayList<View> sortedViews = new ArrayList<View>();
+        ArrayList<View> intersectingViews;
         boolean isSolution = false;
         int dragViewX, dragViewY, dragViewSpanX, dragViewSpanY;
 
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index e2301ba..318066b 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -456,7 +456,7 @@
             if (DISABLE_SYNCHRONOUS_BINDING_CURRENT_PAGE || sPausedFromUserAction) {
                 // If the user leaves launcher, then we should just load items asynchronously when
                 // they return.
-                mModel.startLoader(true, -1);
+                mModel.startLoader(true, PagedView.INVALID_RESTORE_PAGE);
             } else {
                 // We only load the page synchronously if the user rotates (or triggers a
                 // configuration change) while launcher is in the foreground
@@ -914,7 +914,7 @@
         sPausedFromUserAction = false;
         if (mRestoring || mOnResumeNeedsLoad) {
             mWorkspaceLoading = true;
-            mModel.startLoader(true, -1);
+            mModel.startLoader(true, PagedView.INVALID_RESTORE_PAGE);
             mRestoring = false;
             mOnResumeNeedsLoad = false;
         }
@@ -4576,13 +4576,22 @@
     }
 
     public static void addDumpLog(String tag, String log, boolean debugLog) {
+        addDumpLog(tag, log, null, debugLog);
+    }
+
+    public static void addDumpLog(String tag, String log, Exception e, boolean debugLog) {
         if (debugLog) {
-            Log.d(tag, log);
+            if (e != null) {
+                Log.d(tag, log, e);
+            } else {
+                Log.d(tag, log);
+            }
         }
         if (DEBUG_DUMP_LOG) {
             sDateStamp.setTime(System.currentTimeMillis());
             synchronized (sDumpLogs) {
-                sDumpLogs.add(sDateFormat.format(sDateStamp) + ": " + tag + ", " + log);
+                sDumpLogs.add(sDateFormat.format(sDateStamp) + ": " + tag + ", " + log
+                    + (e == null ? "" : (", Exception: " + e)));
             }
         }
     }
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index a69617a..cb2d23b 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -75,6 +75,7 @@
     public static final boolean UPGRADE_USE_MORE_APPS_FOLDER = false;
 
     private static final int ITEMS_CHUNK = 6; // batch size for the workspace icons
+    private static final long INVALID_SCREEN_ID = -1L;
     private final boolean mAppsCanBeOnRemoveableStorage;
 
     private final LauncherAppState mApp;
@@ -1158,7 +1159,7 @@
             }
         }
         if (runLoader) {
-            startLoader(false, -1);
+            startLoader(false, PagedView.INVALID_RESTORE_PAGE);
         }
     }
 
@@ -1192,7 +1193,8 @@
                 // also, don't downgrade isLaunching if we're already running
                 isLaunching = isLaunching || stopLoaderLocked();
                 mLoaderTask = new LoaderTask(mApp.getContext(), isLaunching);
-                if (synchronousBindPage > -1 && mAllAppsLoaded && mWorkspaceLoaded) {
+                if (synchronousBindPage != PagedView.INVALID_RESTORE_PAGE
+                        && mAllAppsLoaded && mWorkspaceLoaded) {
                     mLoaderTask.runBindSynchronousPage(synchronousBindPage);
                 } else {
                     sWorkerThread.setPriority(Thread.NORM_PRIORITY);
@@ -1360,7 +1362,7 @@
         }
 
         void runBindSynchronousPage(int synchronousBindPage) {
-            if (synchronousBindPage < 0) {
+            if (synchronousBindPage == PagedView.INVALID_RESTORE_PAGE) {
                 // Ensure that we have a valid page index to load synchronously
                 throw new RuntimeException("Should not call runBindSynchronousPage() without " +
                         "valid page index");
@@ -1542,8 +1544,8 @@
                                            AtomicBoolean deleteOnItemOverlap) {
             LauncherAppState app = LauncherAppState.getInstance();
             DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
-            int countX = (int) grid.numColumns;
-            int countY = (int) grid.numRows;
+            final int countX = (int) grid.numColumns;
+            final int countY = (int) grid.numRows;
 
             long containerIndex = item.screenId;
             if (item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
@@ -1551,21 +1553,29 @@
                 if (mCallbacks == null ||
                         mCallbacks.get().isAllAppsButtonRank((int) item.screenId)) {
                     deleteOnItemOverlap.set(true);
+                    Log.e(TAG, "Error loading shortcut into hotseat " + item
+                            + " into position (" + item.screenId + ":" + item.cellX + ","
+                            + item.cellY + ") occupied by all apps");
                     return false;
                 }
 
-                if (occupied.containsKey(LauncherSettings.Favorites.CONTAINER_HOTSEAT)) {
-                    if (occupied.get(LauncherSettings.Favorites.CONTAINER_HOTSEAT)
-                            [(int) item.screenId][0] != null) {
+                final ItemInfo[][] hotseatItems =
+                        occupied.get((long) LauncherSettings.Favorites.CONTAINER_HOTSEAT);
+
+                if (hotseatItems != null) {
+                    if (hotseatItems[(int) item.screenId][0] != null) {
                         Log.e(TAG, "Error loading shortcut into hotseat " + item
                                 + " into position (" + item.screenId + ":" + item.cellX + ","
                                 + item.cellY + ") occupied by "
                                 + occupied.get(LauncherSettings.Favorites.CONTAINER_HOTSEAT)
                                 [(int) item.screenId][0]);
                             return false;
+                    } else {
+                        hotseatItems[(int) item.screenId][0] = item;
+                        return true;
                     }
                 } else {
-                    ItemInfo[][] items = new ItemInfo[countX + 1][countY + 1];
+                    final ItemInfo[][] items = new ItemInfo[(int) grid.numHotseatIcons + 1][1];
                     items[(int) item.screenId][0] = item;
                     occupied.put((long) LauncherSettings.Favorites.CONTAINER_HOTSEAT, items);
                     return true;
@@ -1580,7 +1590,7 @@
                 occupied.put(item.screenId, items);
             }
 
-            ItemInfo[][] screens = occupied.get(item.screenId);
+            final ItemInfo[][] screens = occupied.get(item.screenId);
             // Check if any workspace icons overlap with each other
             for (int x = item.cellX; x < (item.cellX+item.spanX); x++) {
                 for (int y = item.cellY; y < (item.cellY+item.spanY); y++) {
@@ -1911,7 +1921,7 @@
                                 break;
                             }
                         } catch (Exception e) {
-                            Launcher.addDumpLog(TAG, "Desktop items loading interrupted: " + e, true);
+                            Launcher.addDumpLog(TAG, "Desktop items loading interrupted", e, true);
                         }
                     }
                 } finally {
@@ -2245,16 +2255,17 @@
                 orderedScreenIds.addAll(sBgWorkspaceScreens);
             }
 
-            final boolean isLoadingSynchronously = (synchronizeBindPage > -1);
+            final boolean isLoadingSynchronously =
+                    synchronizeBindPage != PagedView.INVALID_RESTORE_PAGE;
             int currScreen = isLoadingSynchronously ? synchronizeBindPage :
                 oldCallbacks.getCurrentWorkspaceScreen();
             if (currScreen >= orderedScreenIds.size()) {
                 // There may be no workspace screens (just hotseat items and an empty page).
-                currScreen = -1;
+                currScreen = PagedView.INVALID_RESTORE_PAGE;
             }
             final int currentScreen = currScreen;
-            final long currentScreenId =
-                    currentScreen < 0 ? -1 : orderedScreenIds.get(currentScreen);
+            final long currentScreenId = currentScreen < 0
+                    ? INVALID_SCREEN_ID : orderedScreenIds.get(currentScreen);
 
             // Load all the items that are on the current page first (and in the process, unbind
             // all the existing workspace items before we call startBinding() below.
@@ -2299,7 +2310,7 @@
                 r = new Runnable() {
                     public void run() {
                         Callbacks callbacks = tryGetCallbacks(oldCallbacks);
-                        if (callbacks != null && currentScreen >= 0) {
+                        if (callbacks != null && currentScreen != PagedView.INVALID_RESTORE_PAGE) {
                             callbacks.onPageBoundSynchronously(currentScreen);
                         }
                     }
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 3d1564a..2e944a2 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -216,7 +216,7 @@
 
     // Variables relating to the creation of user folders by hovering shortcuts over shortcuts
     private static final int FOLDER_CREATION_TIMEOUT = 0;
-    private static final int REORDER_TIMEOUT = 250;
+    public static final int REORDER_TIMEOUT = 350;
     private final Alarm mFolderCreationAlarm = new Alarm();
     private final Alarm mReorderAlarm = new Alarm();
     private FolderRingAnimator mDragFolderRingAnimator = null;
@@ -2700,7 +2700,7 @@
             }
 
             int[] resultSpan = new int[2];
-            mTargetCell = dropTargetLayout.createArea((int) mDragViewVisualCenter[0],
+            mTargetCell = dropTargetLayout.performReorder((int) mDragViewVisualCenter[0],
                     (int) mDragViewVisualCenter[1], minSpanX, minSpanY, spanX, spanY,
                     null, mTargetCell, resultSpan, CellLayout.MODE_ACCEPT_DROP);
             boolean foundCell = mTargetCell[0] >= 0 && mTargetCell[1] >= 0;
@@ -2926,7 +2926,7 @@
                 }
 
                 int[] resultSpan = new int[2];
-                mTargetCell = dropTargetLayout.createArea((int) mDragViewVisualCenter[0],
+                mTargetCell = dropTargetLayout.performReorder((int) mDragViewVisualCenter[0],
                         (int) mDragViewVisualCenter[1], minSpanX, minSpanY, spanX, spanY, cell,
                         mTargetCell, resultSpan, CellLayout.MODE_ON_DROP);
 
@@ -3106,13 +3106,11 @@
         display.getCurrentSizeRange(smallestSize, largestSize);
         int countX = (int) grid.numColumns;
         int countY = (int) grid.numRows;
-        int constrainedLongEdge = largestSize.y;
-        int constrainedShortEdge = smallestSize.y;
         if (orientation == CellLayout.LANDSCAPE) {
             if (mLandscapeCellLayoutMetrics == null) {
                 Rect padding = grid.getWorkspacePadding(CellLayout.LANDSCAPE);
-                int width = constrainedLongEdge - padding.left - padding.right;
-                int height = constrainedShortEdge - padding.top - padding.bottom;
+                int width = largestSize.x - padding.left - padding.right;
+                int height = smallestSize.y - padding.top - padding.bottom;
                 mLandscapeCellLayoutMetrics = new Rect();
                 mLandscapeCellLayoutMetrics.set(
                         grid.calculateCellWidth(width, countX),
@@ -3122,8 +3120,8 @@
         } else if (orientation == CellLayout.PORTRAIT) {
             if (mPortraitCellLayoutMetrics == null) {
                 Rect padding = grid.getWorkspacePadding(CellLayout.PORTRAIT);
-                int width = constrainedShortEdge - padding.left - padding.right;
-                int height = constrainedLongEdge - padding.top - padding.bottom;
+                int width = smallestSize.x - padding.left - padding.right;
+                int height = largestSize.y - padding.top - padding.bottom;
                 mPortraitCellLayoutMetrics = new Rect();
                 mPortraitCellLayoutMetrics.set(
                         grid.calculateCellWidth(width, countX),
@@ -3508,6 +3506,11 @@
                     && !mReorderAlarm.alarmPending() && (mLastReorderX != reorderX ||
                     mLastReorderY != reorderY)) {
 
+                int[] resultSpan = new int[2];
+                mDragTargetLayout.performReorder((int) mDragViewVisualCenter[0],
+                        (int) mDragViewVisualCenter[1], minSpanX, minSpanY, item.spanX, item.spanY,
+                        child, mTargetCell, resultSpan, CellLayout.MODE_SHOW_REORDER_HINT);
+
                 // Otherwise, if we aren't adding to or creating a folder and there's no pending
                 // reorder, then we schedule a reorder
                 ReorderAlarmListener listener = new ReorderAlarmListener(mDragViewVisualCenter,
@@ -3612,7 +3615,7 @@
             mLastReorderX = mTargetCell[0];
             mLastReorderY = mTargetCell[1];
 
-            mTargetCell = mDragTargetLayout.createArea((int) mDragViewVisualCenter[0],
+            mTargetCell = mDragTargetLayout.performReorder((int) mDragViewVisualCenter[0],
                 (int) mDragViewVisualCenter[1], minSpanX, minSpanY, spanX, spanY,
                 child, mTargetCell, resultSpan, CellLayout.MODE_DRAG_OVER);
 
@@ -3722,7 +3725,7 @@
                     minSpanY = item.minSpanY;
                 }
                 int[] resultSpan = new int[2];
-                mTargetCell = cellLayout.createArea((int) mDragViewVisualCenter[0],
+                mTargetCell = cellLayout.performReorder((int) mDragViewVisualCenter[0],
                         (int) mDragViewVisualCenter[1], minSpanX, minSpanY, info.spanX, info.spanY,
                         null, mTargetCell, resultSpan, CellLayout.MODE_ON_DROP_EXTERNAL);
 
@@ -3814,7 +3817,7 @@
 
             if (touchXY != null) {
                 // when dragging and dropping, just find the closest free spot
-                mTargetCell = cellLayout.createArea((int) mDragViewVisualCenter[0],
+                mTargetCell = cellLayout.performReorder((int) mDragViewVisualCenter[0],
                         (int) mDragViewVisualCenter[1], 1, 1, 1, 1,
                         null, mTargetCell, null, CellLayout.MODE_ON_DROP_EXTERNAL);
             } else {
diff --git a/util/com/android/launcher3/DecoderRing.java b/util/com/android/launcher3/DecoderRing.java
index 1d9e0de..bd0275e 100644
--- a/util/com/android/launcher3/DecoderRing.java
+++ b/util/com/android/launcher3/DecoderRing.java
@@ -49,7 +49,7 @@
     public static void main(String[ ] args)
             throws Exception {
         File source = null;
-        Class type = Key.class;
+        Class type = null;
         int skip = 0;
 
         for (int i = 0; i < args.length; i++) {
@@ -79,6 +79,9 @@
             }
         }
 
+        if (type == null) {
+            usage(args);
+        }
 
         // read in the bytes
         ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
diff --git a/util/etc/launcher_protoutil b/util/etc/launcher_protoutil
new file mode 100644
index 0000000..833b583
--- /dev/null
+++ b/util/etc/launcher_protoutil
@@ -0,0 +1,83 @@
+#!/bin/bash
+#
+# Copyright (C) 2013 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Set up prog to be the path of this script, including following symlinks,
+# and set up progdir to be the fully-qualified pathname of its directory.
+prog="$0"
+while [ -h "${prog}" ]; do
+    newProg=`/bin/ls -ld "${prog}"`
+    newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
+    if expr "x${newProg}" : 'x/' >/dev/null; then
+        prog="${newProg}"
+    else
+        progdir=`dirname "${prog}"`
+        prog="${progdir}/${newProg}"
+    fi
+done
+oldwd=`pwd`
+progdir=`dirname "${prog}"`
+cd "${progdir}"
+progdir=`pwd`
+prog="${progdir}"/`basename "${prog}"`
+cd "${oldwd}"
+
+jarfile=launcher_protoutil_lib.jar
+libdir="$progdir"
+
+if [ ! -r "$libdir/$jarfile" ]; then
+    # set jar location for the Android tree case
+    libdir=`dirname "$progdir"`/framework
+fi
+
+if [ ! -r "$libdir/$jarfile" ]; then
+    echo `basename "$prog"`": can't find $jarfile"
+    exit 1
+fi
+
+# By default, give decoder a max heap size of 1 gig. This can be overridden
+# by using a "-J" option (see below).
+defaultMx="-Xmx1024M"
+
+# The following will extract any initial parameters of the form
+# "-J<stuff>" from the command line and pass them to the Java
+# invocation (instead of to the decoder). This makes it possible for
+# you to add a command-line parameter such as "-JXmx256M" in your
+# scripts, for example. "java" (with no args) and "java -X" give a
+# summary of available options.
+
+javaOpts=""
+
+while expr "x$1" : 'x-J' >/dev/null; do
+    opt=`expr "x$1" : 'x-J\(.*\)'`
+    javaOpts="${javaOpts} -${opt}"
+    if expr "x${opt}" : "xXmx[0-9]" >/dev/null; then
+        defaultMx="no"
+    fi
+    shift
+done
+
+if [ "${defaultMx}" != "no" ]; then
+    javaOpts="${javaOpts} ${defaultMx}"
+fi
+
+if [ "$OSTYPE" = "cygwin" ]; then
+    # For Cygwin, convert the jarfile path into native Windows style.
+    jarpath=`cygpath -w "$libdir/$jarfile"`
+else
+    jarpath="$libdir/$jarfile"
+fi
+
+exec java $javaOpts -jar "$jarpath" "$@"
diff --git a/util/etc/manifest.txt b/util/etc/manifest.txt
new file mode 100644
index 0000000..84842ed
--- /dev/null
+++ b/util/etc/manifest.txt
@@ -0,0 +1 @@
+Main-Class: com.android.launcher3.DecoderRing
diff --git a/res/drawable-hdpi/ic_actionbar_accept.png b/wallpaper_picker_res/drawable-hdpi/ic_actionbar_accept.png
similarity index 100%
rename from res/drawable-hdpi/ic_actionbar_accept.png
rename to wallpaper_picker_res/drawable-hdpi/ic_actionbar_accept.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_images.png b/wallpaper_picker_res/drawable-hdpi/ic_images.png
similarity index 100%
rename from res/drawable-hdpi/ic_images.png
rename to wallpaper_picker_res/drawable-hdpi/ic_images.png
Binary files differ
diff --git a/res/drawable-hdpi/tile_picker_focused.9.png b/wallpaper_picker_res/drawable-hdpi/tile_picker_focused.9.png
similarity index 100%
rename from res/drawable-hdpi/tile_picker_focused.9.png
rename to wallpaper_picker_res/drawable-hdpi/tile_picker_focused.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tile_picker_pressed.9.png b/wallpaper_picker_res/drawable-hdpi/tile_picker_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi/tile_picker_pressed.9.png
rename to wallpaper_picker_res/drawable-hdpi/tile_picker_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tile_picker_selected.9.png b/wallpaper_picker_res/drawable-hdpi/tile_picker_selected.9.png
similarity index 100%
rename from res/drawable-hdpi/tile_picker_selected.9.png
rename to wallpaper_picker_res/drawable-hdpi/tile_picker_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tile_shadow_bottom.9.png b/wallpaper_picker_res/drawable-hdpi/tile_shadow_bottom.9.png
similarity index 100%
rename from res/drawable-hdpi/tile_shadow_bottom.9.png
rename to wallpaper_picker_res/drawable-hdpi/tile_shadow_bottom.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tile_shadow_top.9.png b/wallpaper_picker_res/drawable-hdpi/tile_shadow_top.9.png
similarity index 100%
rename from res/drawable-hdpi/tile_shadow_top.9.png
rename to wallpaper_picker_res/drawable-hdpi/tile_shadow_top.9.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_actionbar_accept.png b/wallpaper_picker_res/drawable-mdpi/ic_actionbar_accept.png
similarity index 100%
rename from res/drawable-mdpi/ic_actionbar_accept.png
rename to wallpaper_picker_res/drawable-mdpi/ic_actionbar_accept.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_images.png b/wallpaper_picker_res/drawable-mdpi/ic_images.png
similarity index 100%
rename from res/drawable-mdpi/ic_images.png
rename to wallpaper_picker_res/drawable-mdpi/ic_images.png
Binary files differ
diff --git a/res/drawable-mdpi/tile_picker_focused.9.png b/wallpaper_picker_res/drawable-mdpi/tile_picker_focused.9.png
similarity index 100%
rename from res/drawable-mdpi/tile_picker_focused.9.png
rename to wallpaper_picker_res/drawable-mdpi/tile_picker_focused.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tile_picker_pressed.9.png b/wallpaper_picker_res/drawable-mdpi/tile_picker_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi/tile_picker_pressed.9.png
rename to wallpaper_picker_res/drawable-mdpi/tile_picker_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tile_picker_selected.9.png b/wallpaper_picker_res/drawable-mdpi/tile_picker_selected.9.png
similarity index 100%
rename from res/drawable-mdpi/tile_picker_selected.9.png
rename to wallpaper_picker_res/drawable-mdpi/tile_picker_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tile_shadow_bottom.9.png b/wallpaper_picker_res/drawable-mdpi/tile_shadow_bottom.9.png
similarity index 100%
rename from res/drawable-mdpi/tile_shadow_bottom.9.png
rename to wallpaper_picker_res/drawable-mdpi/tile_shadow_bottom.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tile_shadow_top.9.png b/wallpaper_picker_res/drawable-mdpi/tile_shadow_top.9.png
similarity index 100%
rename from res/drawable-mdpi/tile_shadow_top.9.png
rename to wallpaper_picker_res/drawable-mdpi/tile_shadow_top.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_actionbar_accept.png b/wallpaper_picker_res/drawable-xhdpi/ic_actionbar_accept.png
similarity index 100%
rename from res/drawable-xhdpi/ic_actionbar_accept.png
rename to wallpaper_picker_res/drawable-xhdpi/ic_actionbar_accept.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_images.png b/wallpaper_picker_res/drawable-xhdpi/ic_images.png
similarity index 100%
rename from res/drawable-xhdpi/ic_images.png
rename to wallpaper_picker_res/drawable-xhdpi/ic_images.png
Binary files differ
diff --git a/res/drawable-xhdpi/tile_picker_focused.9.png b/wallpaper_picker_res/drawable-xhdpi/tile_picker_focused.9.png
similarity index 100%
rename from res/drawable-xhdpi/tile_picker_focused.9.png
rename to wallpaper_picker_res/drawable-xhdpi/tile_picker_focused.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tile_picker_pressed.9.png b/wallpaper_picker_res/drawable-xhdpi/tile_picker_pressed.9.png
similarity index 100%
rename from res/drawable-xhdpi/tile_picker_pressed.9.png
rename to wallpaper_picker_res/drawable-xhdpi/tile_picker_pressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tile_picker_selected.9.png b/wallpaper_picker_res/drawable-xhdpi/tile_picker_selected.9.png
similarity index 100%
rename from res/drawable-xhdpi/tile_picker_selected.9.png
rename to wallpaper_picker_res/drawable-xhdpi/tile_picker_selected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tile_shadow_bottom.9.png b/wallpaper_picker_res/drawable-xhdpi/tile_shadow_bottom.9.png
similarity index 100%
rename from res/drawable-xhdpi/tile_shadow_bottom.9.png
rename to wallpaper_picker_res/drawable-xhdpi/tile_shadow_bottom.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tile_shadow_top.9.png b/wallpaper_picker_res/drawable-xhdpi/tile_shadow_top.9.png
similarity index 100%
rename from res/drawable-xhdpi/tile_shadow_top.9.png
rename to wallpaper_picker_res/drawable-xhdpi/tile_shadow_top.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_images.png b/wallpaper_picker_res/drawable-xxhdpi/ic_images.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_images.png
rename to wallpaper_picker_res/drawable-xxhdpi/ic_images.png
Binary files differ
diff --git a/res/drawable-xxhdpi/tile_picker_focused.9.png b/wallpaper_picker_res/drawable-xxhdpi/tile_picker_focused.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tile_picker_focused.9.png
rename to wallpaper_picker_res/drawable-xxhdpi/tile_picker_focused.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/tile_picker_pressed.9.png b/wallpaper_picker_res/drawable-xxhdpi/tile_picker_pressed.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tile_picker_pressed.9.png
rename to wallpaper_picker_res/drawable-xxhdpi/tile_picker_pressed.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/tile_picker_selected.9.png b/wallpaper_picker_res/drawable-xxhdpi/tile_picker_selected.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tile_picker_selected.9.png
rename to wallpaper_picker_res/drawable-xxhdpi/tile_picker_selected.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/tile_shadow_bottom.9.png b/wallpaper_picker_res/drawable-xxhdpi/tile_shadow_bottom.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tile_shadow_bottom.9.png
rename to wallpaper_picker_res/drawable-xxhdpi/tile_shadow_bottom.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/tile_shadow_top.9.png b/wallpaper_picker_res/drawable-xxhdpi/tile_shadow_top.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tile_shadow_top.9.png
rename to wallpaper_picker_res/drawable-xxhdpi/tile_shadow_top.9.png
Binary files differ
diff --git a/res/drawable/wallpaper_tile_fg.xml b/wallpaper_picker_res/drawable/wallpaper_tile_fg.xml
similarity index 100%
rename from res/drawable/wallpaper_tile_fg.xml
rename to wallpaper_picker_res/drawable/wallpaper_tile_fg.xml
diff --git a/res/layout/actionbar_set_wallpaper.xml b/wallpaper_picker_res/layout/actionbar_set_wallpaper.xml
similarity index 100%
rename from res/layout/actionbar_set_wallpaper.xml
rename to wallpaper_picker_res/layout/actionbar_set_wallpaper.xml
diff --git a/res/layout/wallpaper_cropper.xml b/wallpaper_picker_res/layout/wallpaper_cropper.xml
similarity index 100%
rename from res/layout/wallpaper_cropper.xml
rename to wallpaper_picker_res/layout/wallpaper_cropper.xml
diff --git a/res/layout/wallpaper_picker.xml b/wallpaper_picker_res/layout/wallpaper_picker.xml
similarity index 100%
rename from res/layout/wallpaper_picker.xml
rename to wallpaper_picker_res/layout/wallpaper_picker.xml
diff --git a/res/layout/wallpaper_picker_image_picker_item.xml b/wallpaper_picker_res/layout/wallpaper_picker_image_picker_item.xml
similarity index 100%
rename from res/layout/wallpaper_picker_image_picker_item.xml
rename to wallpaper_picker_res/layout/wallpaper_picker_image_picker_item.xml
diff --git a/res/layout/wallpaper_picker_item.xml b/wallpaper_picker_res/layout/wallpaper_picker_item.xml
similarity index 100%
rename from res/layout/wallpaper_picker_item.xml
rename to wallpaper_picker_res/layout/wallpaper_picker_item.xml
diff --git a/res/layout/wallpaper_picker_live_wallpaper_item.xml b/wallpaper_picker_res/layout/wallpaper_picker_live_wallpaper_item.xml
similarity index 100%
rename from res/layout/wallpaper_picker_live_wallpaper_item.xml
rename to wallpaper_picker_res/layout/wallpaper_picker_live_wallpaper_item.xml
diff --git a/res/layout/wallpaper_picker_third_party_item.xml b/wallpaper_picker_res/layout/wallpaper_picker_third_party_item.xml
similarity index 100%
rename from res/layout/wallpaper_picker_third_party_item.xml
rename to wallpaper_picker_res/layout/wallpaper_picker_third_party_item.xml
diff --git a/res/menu/cab_delete_wallpapers.xml b/wallpaper_picker_res/menu/cab_delete_wallpapers.xml
similarity index 100%
rename from res/menu/cab_delete_wallpapers.xml
rename to wallpaper_picker_res/menu/cab_delete_wallpapers.xml
diff --git a/res/mipmap-hdpi/ic_launcher_wallpaper.png b/wallpaper_picker_res/mipmap-hdpi/ic_launcher_wallpaper.png
similarity index 100%
rename from res/mipmap-hdpi/ic_launcher_wallpaper.png
rename to wallpaper_picker_res/mipmap-hdpi/ic_launcher_wallpaper.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_wallpaper.png b/wallpaper_picker_res/mipmap-mdpi/ic_launcher_wallpaper.png
similarity index 100%
rename from res/mipmap-mdpi/ic_launcher_wallpaper.png
rename to wallpaper_picker_res/mipmap-mdpi/ic_launcher_wallpaper.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_wallpaper.png b/wallpaper_picker_res/mipmap-xhdpi/ic_launcher_wallpaper.png
similarity index 100%
rename from res/mipmap-xhdpi/ic_launcher_wallpaper.png
rename to wallpaper_picker_res/mipmap-xhdpi/ic_launcher_wallpaper.png
Binary files differ
diff --git a/res/mipmap-xxhdpi/ic_launcher_wallpaper.png b/wallpaper_picker_res/mipmap-xxhdpi/ic_launcher_wallpaper.png
similarity index 100%
rename from res/mipmap-xxhdpi/ic_launcher_wallpaper.png
rename to wallpaper_picker_res/mipmap-xxhdpi/ic_launcher_wallpaper.png
Binary files differ
diff --git a/res/values-nodpi/wallpapers.xml b/wallpaper_picker_res/values-nodpi/wallpapers.xml
similarity index 100%
rename from res/values-nodpi/wallpapers.xml
rename to wallpaper_picker_res/values-nodpi/wallpapers.xml
diff --git a/wallpaper_picker_res/values-sw720dp/dimens.xml b/wallpaper_picker_res/values-sw720dp/dimens.xml
new file mode 100644
index 0000000..9ae155b
--- /dev/null
+++ b/wallpaper_picker_res/values-sw720dp/dimens.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <dimen name="app_icon_size">72dp</dimen>
+
+<!-- QSB -->
+    <dimen name="toolbar_button_vertical_padding">8dip</dimen>
+    <dimen name="toolbar_button_horizontal_padding">8dip</dimen>
+
+    <!-- When dragging items on the workspace, the number of dps by which the position of
+     the drag view should be offset from the position of the original view. -->
+    <dimen name="dragViewOffsetX">0dp</dimen>
+    <dimen name="dragViewOffsetY">0dp</dimen>
+</resources>
diff --git a/wallpaper_picker_res/values-sw720dp/styles.xml b/wallpaper_picker_res/values-sw720dp/styles.xml
new file mode 100644
index 0000000..9107851
--- /dev/null
+++ b/wallpaper_picker_res/values-sw720dp/styles.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2013 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+-->
+
+<resources>
+    <style name="Theme" parent="android:Theme.Holo.Wallpaper.NoTitleBar">
+        <item name="android:windowActionModeOverlay">true</item>
+        <item name="android:windowTranslucentStatus">true</item>
+        <item name="android:windowTranslucentNavigation">true</item>
+    </style>
+</resources>
diff --git a/wallpaper_picker_res/values/colors.xml b/wallpaper_picker_res/values/colors.xml
new file mode 100644
index 0000000..adae7cf
--- /dev/null
+++ b/wallpaper_picker_res/values/colors.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/colors.xml
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+<resources>
+    <color name="wallpaper_picker_translucent_gray">#66000000</color>
+</resources>
diff --git a/wallpaper_picker_res/values/dimens.xml b/wallpaper_picker_res/values/dimens.xml
new file mode 100644
index 0000000..0447c6d
--- /dev/null
+++ b/wallpaper_picker_res/values/dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+<!-- Wallpaper picker -->
+    <dimen name="wallpaperThumbnailWidth">106.5dp</dimen>
+    <dimen name="wallpaperThumbnailHeight">94.5dp</dimen>
+    <dimen name="wallpaperItemIconSize">32dp</dimen>
+</resources>
diff --git a/wallpaper_picker_res/values/strings.xml b/wallpaper_picker_res/values/strings.xml
new file mode 100644
index 0000000..1ee3513
--- /dev/null
+++ b/wallpaper_picker_res/values/strings.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2013 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Button label on Wallpaper picker screen; user selects this button to set a specific wallpaper -->
+    <string name="wallpaper_instructions">Set wallpaper</string>
+    <!-- Error message when an image is selected as a wallpaper,
+         but the wallpaper picker cannot load it -->
+    <string name="image_load_fail">Coudn\'t load image</string>
+    <!-- Error message when an image is selected as a wallpaper,
+         but the wallpaper cropper cannot load it. The user will
+         usually see this when using another app and trying to set
+         an image as the wallpaper -->
+    <string name="wallpaper_load_fail">Couldn\'t load image as wallpaper</string>
+    <!-- Shown when wallpapers are selected in Wallpaper picker -->
+    <!-- String indicating how many media item(s) is(are) selected
+            eg. 1 selected [CHAR LIMIT=30] -->
+    <plurals name="number_of_items_selected">
+        <item quantity="zero">%1$d selected</item>
+        <item quantity="one">%1$d selected</item>
+        <item quantity="other">%1$d selected</item>
+    </plurals>
+    <!-- Accessibility string used as a label for a particular wallpaper in the Wallpaper Picker list.
+         e.g. "Wallpaper 3 of 10" -->
+    <string name="wallpaper_accessibility_name">Wallpaper %1$d of %2$d</string>
+    <!-- Accessibility string used to announce that a wallpaper has been selected. -->
+    <string name="announce_selection">Selected <xliff:g id="label" example="Wallpaper 3 of 10">%1$s</xliff:g></string>
+
+    <!-- Label on button to delete wallpaper(s) -->
+    <string name="wallpaper_delete">Delete</string>
+    <!-- Label on button in Wallpaper Picker to pick an image -->
+    <string name="pick_image">Pick image</string>
+    <!-- Option in "Select wallpaper from" dialog box -->
+    <string name="pick_wallpaper">Wallpapers</string>
+    <!-- Title of activity for cropping wallpapers -->
+    <string name="crop_wallpaper">Crop wallpaper</string>
+</resources>
diff --git a/wallpaper_picker_res/values/styles.xml b/wallpaper_picker_res/values/styles.xml
new file mode 100644
index 0000000..0e48dda
--- /dev/null
+++ b/wallpaper_picker_res/values/styles.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2013 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+-->
+
+<resources>
+    <style name="Theme.WallpaperCropper" parent="@android:style/Theme.Holo">
+        <item name="android:actionBarStyle">@style/WallpaperCropperActionBar</item>
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowActionBarOverlay">true</item>
+        <item name="android:windowTranslucentNavigation">true</item>
+    </style>
+
+    <style name="WallpaperCropperActionBar" parent="android:style/Widget.Holo.ActionBar">
+        <item name="android:displayOptions">showCustom</item>
+        <item name="android:background">#88000000</item>
+    </style>
+
+    <style name="Theme" parent="@android:style/Theme.Holo.Wallpaper.NoTitleBar">
+        <item name="android:windowTranslucentStatus">true</item>
+        <item name="android:windowTranslucentNavigation">true</item>
+    </style>
+</resources>
diff --git a/src/android/util/Pools.java b/wallpaper_picker_src/android/util/Pools.java
similarity index 100%
rename from src/android/util/Pools.java
rename to wallpaper_picker_src/android/util/Pools.java
diff --git a/src/com/android/gallery3d/common/BitmapUtils.java b/wallpaper_picker_src/com/android/gallery3d/common/BitmapUtils.java
similarity index 100%
rename from src/com/android/gallery3d/common/BitmapUtils.java
rename to wallpaper_picker_src/com/android/gallery3d/common/BitmapUtils.java
diff --git a/src/com/android/gallery3d/common/Utils.java b/wallpaper_picker_src/com/android/gallery3d/common/Utils.java
similarity index 100%
rename from src/com/android/gallery3d/common/Utils.java
rename to wallpaper_picker_src/com/android/gallery3d/common/Utils.java
diff --git a/src/com/android/gallery3d/exif/ByteBufferInputStream.java b/wallpaper_picker_src/com/android/gallery3d/exif/ByteBufferInputStream.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ByteBufferInputStream.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ByteBufferInputStream.java
diff --git a/src/com/android/gallery3d/exif/CountedDataInputStream.java b/wallpaper_picker_src/com/android/gallery3d/exif/CountedDataInputStream.java
similarity index 100%
rename from src/com/android/gallery3d/exif/CountedDataInputStream.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/CountedDataInputStream.java
diff --git a/src/com/android/gallery3d/exif/ExifData.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifData.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifData.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifData.java
diff --git a/src/com/android/gallery3d/exif/ExifInterface.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifInterface.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifInterface.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifInterface.java
diff --git a/src/com/android/gallery3d/exif/ExifInvalidFormatException.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifInvalidFormatException.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifInvalidFormatException.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifInvalidFormatException.java
diff --git a/src/com/android/gallery3d/exif/ExifModifier.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifModifier.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifModifier.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifModifier.java
diff --git a/src/com/android/gallery3d/exif/ExifOutputStream.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifOutputStream.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifOutputStream.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifOutputStream.java
diff --git a/src/com/android/gallery3d/exif/ExifParser.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifParser.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifParser.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifParser.java
diff --git a/src/com/android/gallery3d/exif/ExifReader.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifReader.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifReader.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifReader.java
diff --git a/src/com/android/gallery3d/exif/ExifTag.java b/wallpaper_picker_src/com/android/gallery3d/exif/ExifTag.java
similarity index 100%
rename from src/com/android/gallery3d/exif/ExifTag.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/ExifTag.java
diff --git a/src/com/android/gallery3d/exif/IfdData.java b/wallpaper_picker_src/com/android/gallery3d/exif/IfdData.java
similarity index 100%
rename from src/com/android/gallery3d/exif/IfdData.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/IfdData.java
diff --git a/src/com/android/gallery3d/exif/IfdId.java b/wallpaper_picker_src/com/android/gallery3d/exif/IfdId.java
similarity index 100%
rename from src/com/android/gallery3d/exif/IfdId.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/IfdId.java
diff --git a/src/com/android/gallery3d/exif/JpegHeader.java b/wallpaper_picker_src/com/android/gallery3d/exif/JpegHeader.java
similarity index 100%
rename from src/com/android/gallery3d/exif/JpegHeader.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/JpegHeader.java
diff --git a/src/com/android/gallery3d/exif/OrderedDataOutputStream.java b/wallpaper_picker_src/com/android/gallery3d/exif/OrderedDataOutputStream.java
similarity index 100%
rename from src/com/android/gallery3d/exif/OrderedDataOutputStream.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/OrderedDataOutputStream.java
diff --git a/src/com/android/gallery3d/exif/Rational.java b/wallpaper_picker_src/com/android/gallery3d/exif/Rational.java
similarity index 100%
rename from src/com/android/gallery3d/exif/Rational.java
rename to wallpaper_picker_src/com/android/gallery3d/exif/Rational.java
diff --git a/src/com/android/gallery3d/glrenderer/BasicTexture.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/BasicTexture.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/BasicTexture.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/BasicTexture.java
diff --git a/src/com/android/gallery3d/glrenderer/BitmapTexture.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/BitmapTexture.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/BitmapTexture.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/BitmapTexture.java
diff --git a/src/com/android/gallery3d/glrenderer/GLCanvas.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/GLCanvas.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/GLCanvas.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/GLCanvas.java
diff --git a/src/com/android/gallery3d/glrenderer/GLES20Canvas.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/GLES20Canvas.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/GLES20Canvas.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/GLES20Canvas.java
diff --git a/src/com/android/gallery3d/glrenderer/GLES20IdImpl.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/GLES20IdImpl.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/GLES20IdImpl.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/GLES20IdImpl.java
diff --git a/src/com/android/gallery3d/glrenderer/GLId.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/GLId.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/GLId.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/GLId.java
diff --git a/src/com/android/gallery3d/glrenderer/GLPaint.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/GLPaint.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/GLPaint.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/GLPaint.java
diff --git a/src/com/android/gallery3d/glrenderer/RawTexture.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/RawTexture.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/RawTexture.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/RawTexture.java
diff --git a/src/com/android/gallery3d/glrenderer/Texture.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/Texture.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/Texture.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/Texture.java
diff --git a/src/com/android/gallery3d/glrenderer/UploadedTexture.java b/wallpaper_picker_src/com/android/gallery3d/glrenderer/UploadedTexture.java
similarity index 100%
rename from src/com/android/gallery3d/glrenderer/UploadedTexture.java
rename to wallpaper_picker_src/com/android/gallery3d/glrenderer/UploadedTexture.java
diff --git a/src/com/android/gallery3d/util/IntArray.java b/wallpaper_picker_src/com/android/gallery3d/util/IntArray.java
similarity index 100%
rename from src/com/android/gallery3d/util/IntArray.java
rename to wallpaper_picker_src/com/android/gallery3d/util/IntArray.java
diff --git a/src/com/android/launcher3/CropView.java b/wallpaper_picker_src/com/android/launcher3/CropView.java
similarity index 100%
rename from src/com/android/launcher3/CropView.java
rename to wallpaper_picker_src/com/android/launcher3/CropView.java
diff --git a/src/com/android/launcher3/WallpaperCropActivity.java b/wallpaper_picker_src/com/android/launcher3/WallpaperCropActivity.java
similarity index 100%
rename from src/com/android/launcher3/WallpaperCropActivity.java
rename to wallpaper_picker_src/com/android/launcher3/WallpaperCropActivity.java
diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/wallpaper_picker_src/com/android/launcher3/WallpaperPickerActivity.java
similarity index 100%
rename from src/com/android/launcher3/WallpaperPickerActivity.java
rename to wallpaper_picker_src/com/android/launcher3/WallpaperPickerActivity.java
diff --git a/src/com/android/photos/BitmapRegionTileSource.java b/wallpaper_picker_src/com/android/photos/BitmapRegionTileSource.java
similarity index 100%
rename from src/com/android/photos/BitmapRegionTileSource.java
rename to wallpaper_picker_src/com/android/photos/BitmapRegionTileSource.java
diff --git a/src/com/android/photos/views/BlockingGLTextureView.java b/wallpaper_picker_src/com/android/photos/views/BlockingGLTextureView.java
similarity index 100%
rename from src/com/android/photos/views/BlockingGLTextureView.java
rename to wallpaper_picker_src/com/android/photos/views/BlockingGLTextureView.java
diff --git a/src/com/android/photos/views/TiledImageRenderer.java b/wallpaper_picker_src/com/android/photos/views/TiledImageRenderer.java
similarity index 100%
rename from src/com/android/photos/views/TiledImageRenderer.java
rename to wallpaper_picker_src/com/android/photos/views/TiledImageRenderer.java
diff --git a/src/com/android/photos/views/TiledImageView.java b/wallpaper_picker_src/com/android/photos/views/TiledImageView.java
similarity index 100%
rename from src/com/android/photos/views/TiledImageView.java
rename to wallpaper_picker_src/com/android/photos/views/TiledImageView.java