Revert "Allapps motion changes for landscape"

This reverts commit d15dccf10eec367e38b8723c409909a29307057a.

Change-Id: I04c06d419bc636929259bc5f4fdce982d97ef33f
diff --git a/res/layout/gradient_scrim.xml b/res/layout/gradient_scrim.xml
index 15516b0..c40c5fc 100644
--- a/res/layout/gradient_scrim.xml
+++ b/res/layout/gradient_scrim.xml
@@ -26,5 +26,6 @@
         android:id="@+id/scrim_bg"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:visibility="gone"/>
+        android:visibility="gone"
+        app:layout_ignoreInsets="true"/>
 </merge>
\ No newline at end of file
diff --git a/src/com/android/launcher3/graphics/ScrimView.java b/src/com/android/launcher3/graphics/ScrimView.java
index c102cab..feb3f03 100644
--- a/src/com/android/launcher3/graphics/ScrimView.java
+++ b/src/com/android/launcher3/graphics/ScrimView.java
@@ -29,12 +29,10 @@
 import android.view.animation.AccelerateInterpolator;
 import android.view.animation.Interpolator;
 
-import com.android.launcher3.DeviceProfile;
-import com.android.launcher3.Launcher;
 import com.android.launcher3.R;
 import com.android.launcher3.Utilities;
 
-public class ScrimView extends View implements DeviceProfile.LauncherLayoutChangeListener {
+public class ScrimView extends View {
 
     private static final boolean DEBUG = false;
 
@@ -59,10 +57,6 @@
     private final Interpolator mAccelerator = new AccelerateInterpolator();
     private final Paint mDebugPaint = DEBUG ? new Paint() : null;
 
-    private int mPaddingLeft;
-    private int mPaddingRight;
-    private int mAlphaStart;
-
     public ScrimView(Context context, AttributeSet attrs) {
         super(context, attrs);
         mMaskHeight = Utilities.pxFromDp(MASK_HEIGHT_DP, getResources().getDisplayMetrics());
@@ -81,21 +75,6 @@
     }
 
     @Override
-    protected void onAttachedToWindow() {
-        super.onAttachedToWindow();
-        updatePaddingAndAlphaStart();
-        Launcher.getLauncher(getContext()).getDeviceProfile()
-                .addLauncherLayoutChangedListener(this);
-    }
-
-    @Override
-    protected void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-        Launcher.getLauncher(getContext()).getDeviceProfile()
-                .removeLauncherLayoutChangedListener(this);
-    }
-
-    @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         super.onMeasure(widthMeasureSpec, heightMeasureSpec);
         int width = MeasureSpec.getSize(widthMeasureSpec);
@@ -112,8 +91,7 @@
         setTranslationY(linTranslationY);
 
         if (APPLY_ALPHA) {
-            int alpha = mAlphaStart + (int) ((255f - mAlphaStart)
-                    * mAccelerator.getInterpolation(progress));
+            int alpha = 55 + (int) (200f * mAccelerator.getInterpolation(progress));
             mPaint.setAlpha(alpha);
             invalidate();
         }
@@ -121,8 +99,8 @@
 
     @Override
     protected void onDraw(Canvas canvas) {
-        mAlphaMaskRect.set(mPaddingLeft, 0, getWidth() - mPaddingRight, mMaskHeight);
-        mFinalMaskRect.set(mPaddingLeft, mMaskHeight, getWidth() - mPaddingRight, getHeight());
+        mAlphaMaskRect.set(0, 0, getWidth(), mMaskHeight);
+        mFinalMaskRect.set(0, mMaskHeight, getWidth(), getHeight());
         canvas.drawBitmap(sAlphaScrimMask, null, mAlphaMaskRect, mPaint);
         canvas.drawBitmap(sFinalScrimMask, null, mFinalMaskRect, mPaint);
 
@@ -133,23 +111,4 @@
         }
     }
 
-    @Override
-    public void onLauncherLayoutChanged() {
-        updatePaddingAndAlphaStart();
-        invalidate();
-    }
-
-    private void updatePaddingAndAlphaStart() {
-        DeviceProfile grid = Launcher.getLauncher(getContext()).getDeviceProfile();
-        if (grid.isVerticalBarLayout()) {
-            int[] padding = grid.getContainerPadding();
-            mPaddingLeft = padding[0] + grid.edgeMarginPx;
-            mPaddingRight = padding[1] + grid.edgeMarginPx;
-            mAlphaStart = 0;
-        } else {
-            mPaddingLeft = 0;
-            mPaddingRight = 0;
-            mAlphaStart = 55;
-        }
-    }
 }