Reconcile with ics-mr1-release

Change-Id: I4b78781b7fc2d280e633586f53572e639fc7cd90
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index dc498a4..01417bf 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -134,7 +134,7 @@
                 mPressedOrFocusedBackground = null;
             }
             if (isFocused()) {
-                if (mLayout == null) {
+                if (getLayout() == null) {
                     // In some cases, we get focus before we have been layed out. Set the
                     // background to null so that it will get created when the view is drawn.
                     mPressedOrFocusedBackground = null;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 864fca5..0b93b66 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -139,6 +139,7 @@
     static final int DIALOG_RENAME_FOLDER = 2;
 
     private static final String PREFERENCES = "launcher.preferences";
+    static final String FORCE_ENABLE_ROTATION_PROPERTY = "launcher.force_enable_rotation";
 
     // Type: int
     private static final String RUNTIME_STATE_CURRENT_SCREEN = "launcher.current_screen";
@@ -348,8 +349,11 @@
         }
         mSearchDropTargetBar.onSearchPackagesChanged(searchVisible, voiceVisible);
 
+        final String forceEnableRotation = 
+                SystemProperties.get(FORCE_ENABLE_ROTATION_PROPERTY, "false");
+
         // On large interfaces, we want the screen to auto-rotate based on the current orientation
-        if (LauncherApplication.isScreenLarge() || Build.TYPE.contentEquals("eng")) {
+        if (LauncherApplication.isScreenLarge() || "true".equalsIgnoreCase(forceEnableRotation)) {
             setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
         }
     }
diff --git a/src/com/android/launcher2/RocketLauncher.java b/src/com/android/launcher2/RocketLauncher.java
index 1255374..505ac4c 100644
--- a/src/com/android/launcher2/RocketLauncher.java
+++ b/src/com/android/launcher2/RocketLauncher.java
@@ -23,7 +23,6 @@
 import android.animation.AnimatorSet;
 import android.animation.ObjectAnimator;
 import android.animation.TimeAnimator;
-import android.app.Activity;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -31,6 +30,7 @@
 import android.graphics.Point;
 import android.graphics.Rect;
 import android.os.Handler;
+import android.support.v13.dreams.BasicDream;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.view.MotionEvent;
@@ -44,7 +44,7 @@
 import java.util.HashMap;
 import java.util.Random;
 
-public class RocketLauncher extends Activity {
+public class RocketLauncher extends BasicDream {
     public static final boolean ROCKET_LAUNCHER = true;
 
     public static class Board extends FrameLayout