Synchronize WCT for TaskView with SurfaceControl.Transaction.

- Introduces SyncTransactionQueue to TaskView.
- Synchronizes the visibility, location, size changes of the window with
  Surface transaction.

Bug: 151449487
Test: atest TaskViewTest BubblesTest NewNotifPipelineBubblesTest
Change-Id: I13df32bb41e83bfb512be503218fcd6b44a144b3
This commit is contained in:
Yuncheol Heo
2021-05-21 11:15:49 -07:00
parent 2312f1fd57
commit 60b68fcbbe
10 changed files with 76 additions and 29 deletions

View File

@@ -1554,12 +1554,21 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
* @hide
*/
public void setResizeBackgroundColor(int bgColor) {
setResizeBackgroundColor(mTmpTransaction, bgColor);
mTmpTransaction.apply();
}
/**
* Version of {@link #setResizeBackgroundColor(int)} that allows you to provide
* {@link SurfaceControl.Transaction}.
* @hide
*/
public void setResizeBackgroundColor(@NonNull SurfaceControl.Transaction t, int bgColor) {
if (mBackgroundControl == null) {
return;
}
mBackgroundColor = bgColor;
updateBackgroundColor(mTmpTransaction).apply();
updateBackgroundColor(t);
}
@UnsupportedAppUsage