Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a030ef9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Removing various reflection based animations, to allow for better...

Merge "Removing various reflection based animations, to allow for better proguarding" into ub-launcher3-master
parents 6687ba0c 55bdeed7
Loading
Loading
Loading
Loading
+0 −74
Original line number Diff line number Diff line
@@ -2,80 +2,6 @@
  *;
}

-keep class com.android.launcher3.allapps.AllAppsBackgroundDrawable {
  public void setAlpha(int);
  public int getAlpha();
}

-keep class com.android.launcher3.BaseRecyclerViewFastScrollBar {
  public void setThumbWidth(int);
  public int getThumbWidth();
  public void setTrackWidth(int);
  public int getTrackWidth();
}

-keep class com.android.launcher3.BaseRecyclerViewFastScrollPopup {
  public void setAlpha(float);
  public float getAlpha();
}

-keep class com.android.launcher3.ButtonDropTarget {
  public int getTextColor();
}

-keep class com.android.launcher3.CellLayout {
  public float getBackgroundAlpha();
  public void setBackgroundAlpha(float);
}

-keep class com.android.launcher3.CellLayout$LayoutParams {
  public void setWidth(int);
  public int getWidth();
  public void setHeight(int);
  public int getHeight();
  public void setX(int);
  public int getX();
  public void setY(int);
  public int getY();
}

-keep class com.android.launcher3.views.BaseDragLayer$LayoutParams {
  public void setWidth(int);
  public int getWidth();
  public void setHeight(int);
  public int getHeight();
  public void setX(int);
  public int getX();
  public void setY(int);
  public int getY();
}

-keep class com.android.launcher3.FastBitmapDrawable {
  public void setDesaturation(float);
  public float getDesaturation();
  public void setBrightness(float);
  public float getBrightness();
}

-keep class com.android.launcher3.MemoryDumpActivity {
  *;
}

-keep class com.android.launcher3.PreloadIconDrawable {
  public float getAnimationProgress();
  public void setAnimationProgress(float);
}

-keep class com.android.launcher3.pageindicators.CaretDrawable {
  public float getCaretProgress();
  public void setCaretProgress(float);
}

-keep class com.android.launcher3.Workspace {
  public float getBackgroundAlpha();
  public void setBackgroundAlpha(float);
}

# Proguard will strip new callbacks in LauncherApps.Callback from
# WrappedCallback if compiled against an older SDK. Don't let this happen.
-keep class com.android.launcher3.compat.** {
+9 −4
Original line number Diff line number Diff line
package com.android.launcher3;

import static com.android.launcher3.LauncherAnimUtils.LAYOUT_HEIGHT;
import static com.android.launcher3.LauncherAnimUtils.LAYOUT_WIDTH;
import static com.android.launcher3.views.BaseDragLayer.LAYOUT_X;
import static com.android.launcher3.views.BaseDragLayer.LAYOUT_Y;

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
@@ -429,10 +434,10 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
            requestLayout();
        } else {
            ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(lp,
                    PropertyValuesHolder.ofInt("width", lp.width, newWidth),
                    PropertyValuesHolder.ofInt("height", lp.height, newHeight),
                    PropertyValuesHolder.ofInt("x", lp.x, newX),
                    PropertyValuesHolder.ofInt("y", lp.y, newY));
                    PropertyValuesHolder.ofInt(LAYOUT_WIDTH, lp.width, newWidth),
                    PropertyValuesHolder.ofInt(LAYOUT_HEIGHT, lp.height, newHeight),
                    PropertyValuesHolder.ofInt(LAYOUT_X, lp.x, newX),
                    PropertyValuesHolder.ofInt(LAYOUT_Y, lp.y, newY));
            mFirstFrameAnimatorHelper.addTo(oa).addUpdateListener(a -> requestLayout());

            AnimatorSet set = new AnimatorSet();
+16 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Property;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -55,6 +56,20 @@ import com.android.launcher3.util.Thunk;
public abstract class ButtonDropTarget extends TextView
        implements DropTarget, DragController.DragListener, OnClickListener {

    private static final Property<ButtonDropTarget, Integer> TEXT_COLOR =
            new Property<ButtonDropTarget, Integer>(Integer.TYPE, "textColor") {

                @Override
                public Integer get(ButtonDropTarget target) {
                    return target.getTextColor();
                }

                @Override
                public void set(ButtonDropTarget target, Integer value) {
                    target.setTextColor(value);
                }
            };

    private static final int[] sTempCords = new int[2];
    private static final int DRAG_VIEW_DROP_DURATION = 285;

@@ -206,7 +221,7 @@ public abstract class ButtonDropTarget extends TextView
        });

        mCurrentColorAnim.play(anim1);
        mCurrentColorAnim.play(ObjectAnimator.ofArgb(this, "textColor", targetColor));
        mCurrentColorAnim.play(ObjectAnimator.ofArgb(this, TEXT_COLOR, targetColor));
        mCurrentColorAnim.start();
    }

+0 −32
Original line number Diff line number Diff line
@@ -2678,38 +2678,6 @@ public class CellLayout extends ViewGroup {
        public String toString() {
            return "(" + this.cellX + ", " + this.cellY + ")";
        }

        public void setWidth(int width) {
            this.width = width;
        }

        public int getWidth() {
            return width;
        }

        public void setHeight(int height) {
            this.height = height;
        }

        public int getHeight() {
            return height;
        }

        public void setX(int x) {
            this.x = x;
        }

        public int getX() {
            return x;
        }

        public void setY(int y) {
            this.y = y;
        }

        public int getY() {
            return y;
        }
    }

    // This class stores info for two purposes:
+27 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.launcher3;
import android.graphics.drawable.Drawable;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup.LayoutParams;

public class LauncherAnimUtils {
    /**
@@ -64,4 +65,30 @@ public class LauncherAnimUtils {
    public static int blockedFlingDurationFactor(float velocity) {
        return (int) Utilities.boundToRange(Math.abs(velocity) / 2, 2f, 6f);
    }

    public static final Property<LayoutParams, Integer> LAYOUT_WIDTH =
            new Property<LayoutParams, Integer>(Integer.TYPE, "width") {
                @Override
                public Integer get(LayoutParams lp) {
                    return lp.width;
                }

                @Override
                public void set(LayoutParams lp, Integer width) {
                    lp.width = width;
                }
            };

    public static final Property<LayoutParams, Integer> LAYOUT_HEIGHT =
            new Property<LayoutParams, Integer>(Integer.TYPE, "height") {
                @Override
                public Integer get(LayoutParams lp) {
                    return lp.height;
                }

                @Override
                public void set(LayoutParams lp, Integer height) {
                    lp.height = height;
                }
            };
}
Loading