Loading quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java +5 −3 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ public final class DigitalWellBeingToast { private ViewOutlineProvider mOldBannerOutlineProvider; private float mBannerOffsetPercentage; private float mBannerAlpha = 1f; private float mVerticalOffset = 0f; public DigitalWellBeingToast(BaseDraggingActivity activity, TaskView taskView) { mActivity = activity; Loading Loading @@ -275,16 +276,17 @@ public final class DigitalWellBeingToast { @Override public void getOutline(View view, Outline outline) { mOldBannerOutlineProvider.getOutline(view, outline); outline.offset(0, -Math.round(view.getTranslationY())); outline.offset(0, Math.round(-view.getTranslationY() + mVerticalOffset)); } }); mBanner.setClipToOutline(true); } void updateBannerOffset(float offsetPercentage) { void updateBannerOffset(float offsetPercentage, float verticalOffset) { if (mBanner != null && mBannerOffsetPercentage != offsetPercentage) { mVerticalOffset = verticalOffset; mBannerOffsetPercentage = offsetPercentage; mBanner.setTranslationY(offsetPercentage * mBanner.getHeight()); mBanner.setTranslationY(offsetPercentage * mBanner.getHeight() + mVerticalOffset); mBanner.invalidateOutline(); } } Loading quickstep/src/com/android/quickstep/views/TaskView.java +6 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import android.app.ActivityOptions; import android.content.Context; import android.content.Intent; import android.graphics.Outline; import android.graphics.Point; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.drawable.Drawable; Loading Loading @@ -429,7 +428,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mContextualChip.setScaleX(comp(modalness)); mContextualChip.setScaleY(comp(modalness)); } mDigitalWellBeingToast.updateBannerOffset(modalness); mDigitalWellBeingToast.updateBannerOffset(modalness, mCurrentFullscreenParams.mCurrentDrawnInsets.top + mCurrentFullscreenParams.mCurrentDrawnInsets.bottom); } public TaskMenuView getMenuView() { Loading Loading @@ -666,7 +667,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mContextualChip.setScaleX(scale); mContextualChip.setScaleY(scale); } mDigitalWellBeingToast.updateBannerOffset(1f - scale); mDigitalWellBeingToast.updateBannerOffset(1f - scale, mCurrentFullscreenParams.mCurrentDrawnInsets.top + mCurrentFullscreenParams.mCurrentDrawnInsets.bottom); } public void setIconScaleAnimStartProgress(float startProgress) { Loading Loading
quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java +5 −3 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ public final class DigitalWellBeingToast { private ViewOutlineProvider mOldBannerOutlineProvider; private float mBannerOffsetPercentage; private float mBannerAlpha = 1f; private float mVerticalOffset = 0f; public DigitalWellBeingToast(BaseDraggingActivity activity, TaskView taskView) { mActivity = activity; Loading Loading @@ -275,16 +276,17 @@ public final class DigitalWellBeingToast { @Override public void getOutline(View view, Outline outline) { mOldBannerOutlineProvider.getOutline(view, outline); outline.offset(0, -Math.round(view.getTranslationY())); outline.offset(0, Math.round(-view.getTranslationY() + mVerticalOffset)); } }); mBanner.setClipToOutline(true); } void updateBannerOffset(float offsetPercentage) { void updateBannerOffset(float offsetPercentage, float verticalOffset) { if (mBanner != null && mBannerOffsetPercentage != offsetPercentage) { mVerticalOffset = verticalOffset; mBannerOffsetPercentage = offsetPercentage; mBanner.setTranslationY(offsetPercentage * mBanner.getHeight()); mBanner.setTranslationY(offsetPercentage * mBanner.getHeight() + mVerticalOffset); mBanner.invalidateOutline(); } } Loading
quickstep/src/com/android/quickstep/views/TaskView.java +6 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import android.app.ActivityOptions; import android.content.Context; import android.content.Intent; import android.graphics.Outline; import android.graphics.Point; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.drawable.Drawable; Loading Loading @@ -429,7 +428,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mContextualChip.setScaleX(comp(modalness)); mContextualChip.setScaleY(comp(modalness)); } mDigitalWellBeingToast.updateBannerOffset(modalness); mDigitalWellBeingToast.updateBannerOffset(modalness, mCurrentFullscreenParams.mCurrentDrawnInsets.top + mCurrentFullscreenParams.mCurrentDrawnInsets.bottom); } public TaskMenuView getMenuView() { Loading Loading @@ -666,7 +667,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mContextualChip.setScaleX(scale); mContextualChip.setScaleY(scale); } mDigitalWellBeingToast.updateBannerOffset(1f - scale); mDigitalWellBeingToast.updateBannerOffset(1f - scale, mCurrentFullscreenParams.mCurrentDrawnInsets.top + mCurrentFullscreenParams.mCurrentDrawnInsets.bottom); } public void setIconScaleAnimStartProgress(float startProgress) { Loading