am 692999a4: (-s ours) am f4e80c84: Merge "Import revised translations. DO NOT MERGE" into ics-mr1

* commit '692999a463aca8730fd5949448449dbe4d4403e9':
  Import revised translations. DO NOT MERGE
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index a37ee5a..c426e45 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -47,7 +47,7 @@
     <string name="shortcut_duplicate" msgid="4757756326465060694">"शार्टकट \"<xliff:g id="NAME">%s</xliff:g>\" पहले से मौजूद है."</string>
     <string name="title_select_shortcut" msgid="2858897527672831763">"शॉर्टकट का चयन करें"</string>
     <string name="title_select_application" msgid="1793455815754848652">"एप्‍लिकेशन चुनें"</string>
-    <string name="all_apps_button_label" msgid="2578400570124163469">"एप्लिकेशन"</string>
+    <string name="all_apps_button_label" msgid="2578400570124163469">"Apps"</string>
     <string name="all_apps_home_button_label" msgid="1022222300329398558">"होम"</string>
     <string name="delete_zone_label_workspace" msgid="7153615831493049150">"निकालें"</string>
     <string name="delete_zone_label_all_apps" msgid="6664588234817475108">"अनइंस्टॉल करें"</string>
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 a9d794d..15da501 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/PagedView.java b/src/com/android/launcher2/PagedView.java
index 3f5652e..1d91f3c 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -67,14 +67,20 @@
 
     private static final float OVERSCROLL_ACCELERATE_FACTOR = 2;
     private static final float OVERSCROLL_DAMP_FACTOR = 0.14f;
-    private static final int MINIMUM_SNAP_VELOCITY = 2200;
-    private static final int MIN_FLING_VELOCITY = 250;
+   
     private static final float RETURN_TO_ORIGINAL_PAGE_THRESHOLD = 0.33f;
     // The page is moved more than halfway, automatically move to the next page on touch up.
     private static final float SIGNIFICANT_MOVE_THRESHOLD = 0.4f;
 
-    // the velocity at which a fling gesture will cause us to snap to the next page
-    protected int mSnapVelocity = 500;
+    // The following constants need to be scaled based on density. The scaled versions will be
+    // assigned to the corresponding member variables below.
+    private static final int FLING_THRESHOLD_VELOCITY = 500;
+    private static final int MIN_SNAP_VELOCITY = 1500;
+    private static final int MIN_FLING_VELOCITY = 250;
+
+    protected int mFlingThresholdVelocity;
+    protected int mMinFlingVelocity;
+    protected int mMinSnapVelocity;
 
     protected float mDensity;
     protected float mSmoothingTime;
@@ -242,6 +248,10 @@
         mPagingTouchSlop = configuration.getScaledPagingTouchSlop();
         mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
         mDensity = getResources().getDisplayMetrics().density;
+
+        mFlingThresholdVelocity = (int) (FLING_THRESHOLD_VELOCITY * mDensity);
+        mMinFlingVelocity = (int) (MIN_FLING_VELOCITY * mDensity);
+        mMinSnapVelocity = (int) (MIN_SNAP_VELOCITY * mDensity);
     }
 
     public void setPageSwitchListener(PageSwitchListener pageSwitchListener) {
@@ -1208,12 +1218,11 @@
                 final int pageWidth = getScaledMeasuredWidth(getPageAt(mCurrentPage));
                 boolean isSignificantMove = Math.abs(deltaX) > pageWidth *
                         SIGNIFICANT_MOVE_THRESHOLD;
-                final int snapVelocity = mSnapVelocity;
 
                 mTotalMotionX += Math.abs(mLastMotionX + mLastMotionXRemainder - x);
 
                 boolean isFling = mTotalMotionX > MIN_LENGTH_FOR_FLING &&
-                        Math.abs(velocityX) > snapVelocity;
+                        Math.abs(velocityX) > mFlingThresholdVelocity;
 
                 // In the case that the page is moved far to one direction and then is flung
                 // in the opposite direction, we use a threshold to determine whether we should
@@ -1434,7 +1443,7 @@
         int delta = newX - mUnboundedScrollX;
         int duration = 0;
 
-        if (Math.abs(velocity) < MIN_FLING_VELOCITY) {
+        if (Math.abs(velocity) < mMinFlingVelocity) {
             // If the velocity is low enough, then treat this more as an automatic page advance
             // as opposed to an apparent physical response to flinging
             snapToPage(whichPage, PAGE_SNAP_ANIMATION_DURATION);
@@ -1450,7 +1459,7 @@
                 distanceInfluenceForSnapDuration(distanceRatio);
 
         velocity = Math.abs(velocity);
-        velocity = Math.max(MINIMUM_SNAP_VELOCITY, velocity);
+        velocity = Math.max(mMinSnapVelocity, velocity);
 
         // we want the page's snap velocity to approximately match the velocity at which the
         // user flings, so we scale the duration by a value near to the derivative of the scroll
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
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 467cec0..fa3dfcb 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -94,6 +94,7 @@
 
     private static final int BACKGROUND_FADE_OUT_DURATION = 350;
     private static final int ADJACENT_SCREEN_DROP_DURATION = 300;
+    private static final int FLING_THRESHOLD_VELOCITY = 500;
 
     // These animators are used to fade the children's outlines
     private ObjectAnimator mChildrenOutlineFadeInAnimation;
@@ -409,13 +410,15 @@
             }
         };
 
-        mSnapVelocity = 600;
         mWallpaperOffset = new WallpaperOffsetInterpolator();
         Display display = mLauncher.getWindowManager().getDefaultDisplay();
         mDisplayWidth = display.getWidth();
         mDisplayHeight = display.getHeight();
         mWallpaperTravelWidth = (int) (mDisplayWidth *
                 wallpaperTravelToScreenWidthRatio(mDisplayWidth, mDisplayHeight));
+
+        mFlingThresholdVelocity = (int) (FLING_THRESHOLD_VELOCITY * mDensity);
+
     }
 
     @Override