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

Commit 705566df authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Removing click-feedback shadow generation logic in BubbleTextView" into ub-launcher3-master

parents 9dd404b3 726bee7d
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.launcher3;

import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS;
import static com.android.systemui.shared.recents.utilities.Utilities.getNextFrameNumber;
import static com.android.systemui.shared.recents.utilities.Utilities.getSurface;
@@ -35,6 +36,7 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import android.util.Log;
@@ -520,8 +522,14 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
                : rect.left;
        final int viewLocationTop = rect.top;

        float startScale = 1f;
        if (isBubbleTextView && !isDeepShortcutTextView) {
            ((BubbleTextView) v).getIconBounds(rect);
            BubbleTextView btv = (BubbleTextView) v;
            btv.getIconBounds(rect);
            Drawable dr = btv.getIcon();
            if (dr instanceof FastBitmapDrawable) {
                startScale = ((FastBitmapDrawable) dr).getAnimatedScale();
            }
        } else {
            rect.set(0, 0, rect.width(), rect.height());
        }
@@ -563,14 +571,10 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
        float maxScaleX = mDeviceProfile.widthPx / (float) rect.width();
        float maxScaleY = mDeviceProfile.heightPx / (float) rect.height();
        float scale = Math.max(maxScaleX, maxScaleY);
        ObjectAnimator sX = ObjectAnimator.ofFloat(mFloatingView, View.SCALE_X, 1f, scale);
        ObjectAnimator sY = ObjectAnimator.ofFloat(mFloatingView, View.SCALE_Y, 1f, scale);
        sX.setDuration(500);
        sY.setDuration(500);
        sX.setInterpolator(Interpolators.EXAGGERATED_EASE);
        sY.setInterpolator(Interpolators.EXAGGERATED_EASE);
        appIconAnimatorSet.play(sX);
        appIconAnimatorSet.play(sY);
        ObjectAnimator scaleAnim = ObjectAnimator
                .ofFloat(mFloatingView, SCALE_PROPERTY, startScale, scale);
        scaleAnim.setDuration(500).setInterpolator(Interpolators.EXAGGERATED_EASE);
        appIconAnimatorSet.play(scaleAnim);

        // Fade out the app icon.
        ObjectAnimator alpha = ObjectAnimator.ofFloat(mFloatingView, View.ALPHA, 1f, 0f);
+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@
        android:textColor="?android:attr/textColorPrimary"
        android:fontFamily="sans-serif"
        launcher:layoutHorizontal="true"
        launcher:deferShadowGeneration="true"
        launcher:iconDisplay="shortcut_popup"
        launcher:iconSizeOverride="@dimen/deep_shortcut_icon_size" />

+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@
        android:fontFamily="sans-serif"
        launcher:iconDisplay="shortcut_popup"
        launcher:layoutHorizontal="true"
        launcher:deferShadowGeneration="true"
        android:focusable="false" />

    <View
+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@
        android:textColor="?android:attr/textColorPrimary"
        android:textSize="16sp"
        android:textAlignment="viewStart"
        launcher:deferShadowGeneration="true"
        launcher:iconDisplay="widget_section"
        launcher:iconSizeOverride="@dimen/widget_section_icon_size"
        launcher:layoutHorizontal="true" />
+0 −1
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@
            <enum name="widget_section" value="3" />
            <enum name="shortcut_popup" value="4" />
        </attr>
        <attr name="deferShadowGeneration" format="boolean" />
        <attr name="centerVertically" format="boolean" />
    </declare-styleable>

Loading