Merge change I9d34c514 into eclair
* changes:
Disable orientation change based on sensor in the wallpaper picker.
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index d4d1424..5eb9007 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -305,6 +305,10 @@
}
final int action = ev.getAction();
+ if (action == MotionEvent.ACTION_DOWN) {
+ recordScreenSize();
+ }
+
final int screenX = clamp((int)ev.getRawX(), 0, mDisplayMetrics.widthPixels);
final int screenY = clamp((int)ev.getRawY(), 0, mDisplayMetrics.heightPixels);
@@ -316,7 +320,6 @@
// Remember location of down touch
mMotionDownX = screenX;
mMotionDownY = screenY;
- recordScreenSize();
mLastDropTarget = null;
break;
@@ -351,7 +354,6 @@
// Remember where the motion event started
mMotionDownX = screenX;
mMotionDownY = screenY;
- recordScreenSize();
if ((screenX < SCROLL_ZONE) || (screenX > scrollView.getWidth() - SCROLL_ZONE)) {
mScrollState = SCROLL_WAITING_IN_ZONE;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 9aa6cd3..2c59b4c 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1057,6 +1057,7 @@
}
private void addItems() {
+ closeAllApps(true);
showAddDialog(mMenuAddInfo);
}
@@ -1252,6 +1253,7 @@
}
private void startWallpaper() {
+ closeAllApps(true);
final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
Intent chooser = Intent.createChooser(pickWallpaper,
getText(R.string.chooser_wallpaper));
@@ -1559,6 +1561,10 @@
final AlertDialog dialog = builder.create();
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
public void onShow(DialogInterface dialog) {
+ mInput.requestFocus();
+ InputMethodManager inputManager = (InputMethodManager)
+ getSystemService(Context.INPUT_METHOD_SERVICE);
+ inputManager.showSoftInput(mInput, 0);
}
});
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 7b53cd7..d76e026 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -607,6 +607,7 @@
*/
mItems.clear();
+ mAppWidgets.clear();
final Cursor c = contentResolver.query(
LauncherSettings.Favorites.CONTENT_URI, null, null, null, null);