Switch ScrimView to use view alpha

Using view alpha instead of background paint’s color alpha component
will make ScrimView alpha and visibility available to View Capture and
any analysis tool that’s based on it.

The change makes ScimView background completely opaque, and makes Scrim
View use variable alpha instead of always-1.0 alpha.

Changes some code that depends on the old way of representing ScrimView
opacity.

Also moves “updateSysUiColors()” call in ScrimView#setBackgroundColor
below updating alpha and background color so the new values are used in
the calculations.

Bug: 282991128
Test: local, presubmit
Change-Id: I6ca089bae55adfb9c3140d06da4fbb3b08f2bf8b
This commit is contained in:
vadimt
2023-05-16 14:21:31 -07:00
parent fde9d30ff2
commit 99c4becf24
7 changed files with 27 additions and 29 deletions

View File

@@ -199,7 +199,7 @@ public class WorkspaceStateTransitionAnimation {
propertySetter.setFloat(sysUiScrim, SYSUI_PROGRESS,
state.hasFlag(FLAG_HAS_SYS_UI_SCRIM) ? 1 : 0, LINEAR);
propertySetter.setViewBackgroundColor(mLauncher.getScrimView(),
propertySetter.setScrimViewBackgroundColor(mLauncher.getScrimView(),
state.getWorkspaceScrimColor(mLauncher),
config.getInterpolator(ANIM_SCRIM_FADE, ACCELERATE_2));
}