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

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

Merge "Only round the corners if the devices supports it"

parents 6f0e6a83 a52cb715
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -386,13 +386,14 @@ public class BubbleExpandedView extends LinearLayout {
        final TypedArray ta = mContext.obtainStyledAttributes(new int[] {
        final TypedArray ta = mContext.obtainStyledAttributes(new int[] {
                android.R.attr.dialogCornerRadius,
                android.R.attr.dialogCornerRadius,
                android.R.attr.colorBackgroundFloating});
                android.R.attr.colorBackgroundFloating});
        mCornerRadius = ta.getDimensionPixelSize(0, 0);
        boolean supportsRoundedCorners = ScreenDecorationsUtils.supportsRoundedCornersOnWindows(
                mContext.getResources());
        mCornerRadius = supportsRoundedCorners ? ta.getDimensionPixelSize(0, 0) : 0;
        mBackgroundColorFloating = ta.getColor(1, Color.WHITE);
        mBackgroundColorFloating = ta.getColor(1, Color.WHITE);
        mExpandedViewContainer.setBackgroundColor(mBackgroundColorFloating);
        mExpandedViewContainer.setBackgroundColor(mBackgroundColorFloating);
        ta.recycle();
        ta.recycle();


        if (mTaskView != null && ScreenDecorationsUtils.supportsRoundedCornersOnWindows(
        if (mTaskView != null) {
                mContext.getResources())) {
            mTaskView.setCornerRadius(mCornerRadius);
            mTaskView.setCornerRadius(mCornerRadius);
        }
        }
        updatePointerView();
        updatePointerView();
+4 −1
Original line number Original line Diff line number Diff line
@@ -70,6 +70,7 @@ import androidx.dynamicanimation.animation.SpringAnimation;
import androidx.dynamicanimation.animation.SpringForce;
import androidx.dynamicanimation.animation.SpringForce;


import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.policy.ScreenDecorationsUtils;
import com.android.internal.util.FrameworkStatsLog;
import com.android.internal.util.FrameworkStatsLog;
import com.android.wm.shell.R;
import com.android.wm.shell.R;
import com.android.wm.shell.animation.Interpolators;
import com.android.wm.shell.animation.Interpolators;
@@ -822,7 +823,9 @@ public class BubbleStackView extends FrameLayout
        mAnimatingOutSurfaceView = new SurfaceView(getContext());
        mAnimatingOutSurfaceView = new SurfaceView(getContext());
        mAnimatingOutSurfaceView.setUseAlpha();
        mAnimatingOutSurfaceView.setUseAlpha();
        mAnimatingOutSurfaceView.setZOrderOnTop(true);
        mAnimatingOutSurfaceView.setZOrderOnTop(true);
        mAnimatingOutSurfaceView.setCornerRadius(mCornerRadius);
        boolean supportsRoundedCorners = ScreenDecorationsUtils.supportsRoundedCornersOnWindows(
                mContext.getResources());
        mAnimatingOutSurfaceView.setCornerRadius(supportsRoundedCorners ? mCornerRadius : 0);
        mAnimatingOutSurfaceView.setLayoutParams(new ViewGroup.LayoutParams(0, 0));
        mAnimatingOutSurfaceView.setLayoutParams(new ViewGroup.LayoutParams(0, 0));
        mAnimatingOutSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
        mAnimatingOutSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
            @Override
            @Override