Merge "Defer onColorsChanged updates during widget-to-home animation" into sc-dev

This commit is contained in:
Cyrus Boadway authored and Android (Google) Code Review committed 2021-06-30 17:14:57 +00:00
commit 1edaed8790
2 files changed
+38 -9

No files matched your search

@@ -152,6 +152,7 @@ public class FloatingWidgetView extends FrameLayout implements AnimatorListener,
RectF widgetBackgroundPosition, Size windowSize, float windowCornerRadius,
boolean appTargetIsTranslucent, int fallbackBackgroundColor) {
mAppWidgetView = originalView;
// Deferrals must begin before GhostView is created. See b/190818220
mAppWidgetView.beginDeferringUpdates();
mBackgroundPosition = widgetBackgroundPosition;
mAppTargetIsTranslucent = appTargetIsTranslucent;
@@ -240,6 +241,7 @@ public class FloatingWidgetView extends FrameLayout implements AnimatorListener,
((ViewGroup) dragLayer.getParent()).removeView(this);
dragLayer.removeView(mListenerView);
mBackgroundView.finish();
// Removing GhostView must occur before ending deferrals. See b/190818220
mAppWidgetView.endDeferringUpdates();
recycle();
mLauncher.getViewCache().recycleView(R.layout.floating_widget_view, this);