summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThe Android Automerger <android-build@android.com>2010-05-25 21:23:30 -0700
committerThe Android Automerger <android-build@android.com>2010-05-25 21:23:30 -0700
commit10405dd6e51195a8ec0e081572068b86df37ec6a (patch)
treea27955b318d72474784ec4b91a8fd4ffbb4ac85b
parentecf404b521e5db8d381c37a878836409b730f98f (diff)
parent3e297b57a0cb06450034a80893b5ede223b33552 (diff)
downloadandroid_packages_apps_Trebuchet-10405dd6e51195a8ec0e081572068b86df37ec6a.tar.gz
android_packages_apps_Trebuchet-10405dd6e51195a8ec0e081572068b86df37ec6a.tar.bz2
android_packages_apps_Trebuchet-10405dd6e51195a8ec0e081572068b86df37ec6a.zip
Merge branch 'froyo' into froyo-release
-rw-r--r--src/com/android/launcher2/DragController.java9
-rw-r--r--src/com/android/launcher2/Launcher.java3
-rw-r--r--src/com/android/launcher2/Workspace.java5
3 files changed, 15 insertions, 2 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index daabbcc4c..b4f972bb2 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -163,6 +163,11 @@ public class DragController {
Bitmap b = getViewBitmap(v);
+ if (b == null) {
+ // out of memory?
+ return;
+ }
+
int[] loc = mCoordinatesTemp;
v.getLocationOnScreen(loc);
int screenX = loc[0];
@@ -249,6 +254,10 @@ public class DragController {
}
v.buildDrawingCache();
Bitmap cacheBitmap = v.getDrawingCache();
+ if (cacheBitmap == null) {
+ Log.e(TAG, "failed getViewBitmap(" + v + ")", new RuntimeException());
+ return null;
+ }
Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 132f0e907..52f122479 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -204,7 +204,6 @@ public final class Launcher extends Activity
private ImageView mNextView;
// Hotseats (quick-launch icons next to AllApps)
- // TODO: move these intial intents out to Uris in an XML resource
private static final int NUM_HOTSEATS = 2;
private String[] mHotseatConfig = null;
private Intent[] mHotseats = null;
@@ -782,6 +781,8 @@ public final class Launcher extends Activity
@SuppressWarnings({"UnusedDeclaration"})
public void launchHotSeat(View v) {
+ if (isAllAppsVisible()) return;
+
int index = -1;
if (v.getId() == R.id.hotseat_left) {
index = 0;
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index f65d956f0..c337c3078 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -36,6 +36,7 @@ import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
@@ -363,7 +364,9 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
*/
void addInScreen(View child, int screen, int x, int y, int spanX, int spanY, boolean insert) {
if (screen < 0 || screen >= getChildCount()) {
- throw new IllegalStateException("The screen must be >= 0 and < " + getChildCount());
+ Log.e(TAG, "The screen must be >= 0 and < " + getChildCount()
+ + " (was " + screen + "); skipping child");
+ return;
}
clearVacantCache();