CL [1] introduced ActivityView's surface view set alpha as zero by default.
but SurfaceView ignores alpha value by default.
So to archieve SurfaceView can support alpha value and then introduced CL[2].
with that CL, it will affect ActivityView that can't see the surface because
of this zero alpha value.
Since CLs[1] & [2] are mainly considered for BubbleController to implement
content visiblity with setting surface view's alpha value without
flickering, and in BubbleExpandedView#onFinishInflate has already
called setContentVisibility(false) to set ActivityView's alpha value as
zero before add this view.
So removing ActivityView's default zero alpha value would be fine, since
it may not always the case that need to set zero alpha but need to show
the black rectangle surface for user. (i.e. ActivityViewTest or Android Auto)
Also, refined ActivityView#setAlpha for some stuff to make it clear.
[1]: Ie5aed373996419b059935889b564ca91c2e3cf23
[2]: I86847de59109b2adf12a2c7c50c988c2cbcf0450
Bug: 137937105
Test: manual as below steps
1) make & install ActivityViewTest
2) launch "AV Main" shortcut
3) press "Test ActivityView" -> "Launch test activity"
4) see if launched Acitvity is visible as expected.
Test: atest ActivityViewTest, observe if ActivityView is visible during testing.
Change-Id: Iaf480912f06a6851001a42bf90e4d962c8a88a37
For backward compatibility, SurfaceView ignores alpha value by
default. In order to reflect alpha value set on the SurfaceView
to its underlying surface, setUseAlpha() needs to be called.
Translucent alpha only works when the surface is placed z-above.
Otherwise only fully opaque and transparent status are supported.
Bug: 137937105
(Orignal bug from b/130442248)
Test: Manual, use BubblesTest app and checks if alpha is set.
Change-Id: I86847de59109b2adf12a2c7c50c988c2cbcf0450
Once QSPanel has been measured, do not measure it again in the pass from
QSContainerImpl.
This prevents measuring with a slightly bigger size
(why?) that causes it to recalculate the number of rows (and the number
of pages) of PagedTileLayout. In some cases, this was causing a
different measure while scrolling for an instant, changing the number of
pages and therefore sending the user to page 0 again.
Fixes: 135136427
Test: manual, following configs:
* landscape and portrait
* 1, 2 and 3 pages
* Security footer off and on with 1 and 2 lines
Change-Id: I74e3ce68bd2d3a8b7af1c84d9d0164ce6a672ed1
My descendants will vilify this CL for generations to come. We'll
clean it up for R, but this is our last, best hope for fixing things
in Q.
Bug: 138775282
Test: manual
Change-Id: I615b2f7fddca30dae67dbaab0e5d54a824a4c441
Previously, we were fading from the previous state, which could
be transparent. The screen would seem to flash if the wallpaper
were light.
Test: manual
Fixes: 138097741
Change-Id: Ic86024b8970e01ed405e90bf12ef2dc27acf1c29
We can't really copy the guts visibility during reinflation
because we might be in the middle of an animation.
Let's rely on a more stable property to determine the visibility.
Test: expand guts, close guts
Test: expand guts, switch dark mode
Test: expand guts, switch dark mode, expand guts again
Test: change font size, expand and collapse guts
Fixes: 135553192
Change-Id: I76f02bbd8f071c94e9c2c777e1d1c1de995ea37b
Assume that doze sensors will be prox gated.
Not doing so would be a bad idea anyway since the device would wake
up way more often than it should and drain battery.
Another improvement on this CL is that regular DozeSensors prox
checks are trying to use a binned brightness sensor instead.
Fixes: 138765669
Test: atest DozeSensorsTest DozeTriggersTest
Test: single tap from AOD (observe no re-registration of lift)
Test: 'reach' from AOD (observe no re-registration of lift)
Test: receive notification with prox covered or unobstructed
Change-Id: I1961ff9b16480ba1a60c397570494dd7acb4802d