frameworks/base
Revision | 1b211832bf413e1617b783470b74e99dc7fb57a7 (tree) |
---|---|
Zeit | 2020-06-13 00:40:54 |
Autor | utzcoz <utzcoz@outl...> |
Commiter | utzcoz |
Ignore system ui visibility for decor caption view visibility
The decor caption will show only for freeform window, and we don't need
to care system ui visibility for freeform window.
Signed-off-by: utzcoz <utzcoz@outlook.com>
@@ -374,7 +374,14 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, | ||
374 | 374 | **/ |
375 | 375 | private void updateCaptionVisibility() { |
376 | 376 | // Don't show the caption if the window has e.g. entered full screen. |
377 | - boolean invisible = isFillingScreen() || !mShow; | |
377 | + // region @boringdroid | |
378 | + // If mShow is true, the window is in freeform window, because only freeform | |
379 | + // window can show decor caption. In freeform window mode, we should ignore | |
380 | + // system ui visibility. If we consider it, the decor caption will dismiss | |
381 | + // if we resize window with fullscreen system ui visibility, such as Clock. | |
382 | + // boolean invisible = isFillingScreen() || !mShow; | |
383 | + boolean invisible = !mShow; | |
384 | + // endregion | |
378 | 385 | mCaption.setVisibility(invisible ? GONE : VISIBLE); |
379 | 386 | mCaption.setOnTouchListener(this); |
380 | 387 | } |