summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java2
-rw-r--r--src/com/android/launcher2/Launcher.java3
-rw-r--r--src/com/android/launcher2/PagedViewWidget.java6
-rw-r--r--src/com/android/launcher2/Workspace.java3
4 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 16dad1be9..9d0399544 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -282,8 +282,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
mWidgetSpacingLayout.calculateCellCount(width, height, maxCellCountX, maxCellCountY);
mCellCountX = mWidgetSpacingLayout.getCellCountX();
mCellCountY = mWidgetSpacingLayout.getCellCountY();
- mWidgetCountX = Math.max(1, (int) Math.round(mCellCountX / 2f));
- mWidgetCountY = Math.max(1, (int) Math.round(mCellCountY / 3f));
// Force a measure to update recalculate the gaps
int widthSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index b1f56d064..0f074ac06 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -483,8 +483,7 @@ public final class Launcher extends Activity
// For example, the user would PICK_SHORTCUT for "Music playlist", and we
// launch over to the Music app to actually CREATE_SHORTCUT.
- if (resultCode == RESULT_OK && mPendingAddInfo.container != ItemInfo.NO_ID &&
- mPendingAddInfo.screen > -1) {
+ if (resultCode == RESULT_OK && mPendingAddInfo.container != ItemInfo.NO_ID) {
final PendingAddArguments args = new PendingAddArguments();
args.requestCode = requestCode;
args.intent = data;
diff --git a/src/com/android/launcher2/PagedViewWidget.java b/src/com/android/launcher2/PagedViewWidget.java
index d9c2a84a1..053c2ea1a 100644
--- a/src/com/android/launcher2/PagedViewWidget.java
+++ b/src/com/android/launcher2/PagedViewWidget.java
@@ -111,8 +111,10 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
name.setText(info.label);
name.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
final TextView dims = (TextView) findViewById(R.id.widget_dims);
- dims.setText(String.format(mDimensionsFormatString, cellSpan[0], cellSpan[1]));
- dims.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
+ if (dims != null) {
+ dims.setText(String.format(mDimensionsFormatString, cellSpan[0], cellSpan[1]));
+ dims.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
+ }
}
public void applyFromResolveInfo(PackageManager pm, ResolveInfo info,
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index f351f2ee1..947c94624 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -2791,8 +2791,7 @@ public class Workspace extends SmoothPagedView
}
}
if (layout == null) {
- layout = findMatchingPageForDragOver(d.dragView, mDragViewVisualCenter[0],
- mDragViewVisualCenter[1], true);
+ layout = findMatchingPageForDragOver(d.dragView, d.x, d.y, true);
}
if (layout != mDragTargetLayout) {
// Cancel all intermediate folder states