Skip to content
Commit dc9b3190 authored by lumark's avatar lumark Committed by Ming-Shin Lu
Browse files

DO NOT MERGE: Fix ActivityView surface can't visible for ActivityViewTest

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
parent 94e8d116
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment