OSDN Git Service

Clock notification text was cut off
authorfelkachang <felkachang@google.com>
Fri, 18 May 2018 12:11:38 +0000 (20:11 +0800)
committerFelka Chang <felkachang@google.com>
Tue, 22 May 2018 06:05:14 +0000 (06:05 +0000)
commite8a3536660bd783acec41a1785f425a1d357c69c
tree9fcede0c3b910684737dadfd0e244f9a7f95f006
parentadc1534453441cd835021485603789f67fbf7a90
Clock notification text was cut off

The root cause is that HeadsUpStatusBarView doesn't considerate the
Cut Out situation. The Cut Out situation can use
getRootWindowInsets().getDisplayCutout().getSafeInsetLeft() to get
the the value.

There are two parts need to handle Cut out.
The one part is to handle the padding. It needs to considerate both of
mLeftInset and mLeftCutOutInset because it use getLocationOnScreen to
count the location.

The other part is to handle the HeadsUpStatusBarView.translationX.
It only needs to considerate mLeftCutOutInset because landscape
degree 90 has the left side cut out and translationX by the distance
between screen left boundary and scroller's left boundary. The
distance include Cut Out so it need minus mCutOutInsetLeft in the
setPanelTranslation.

Cut Out has 4 mode: Disable, Corner, Double, and Tall. Disable and
Double are handled by the same way. Corner and Tall are handled
by the same way.

Bug: 78113562
Test: atest SystemUITests
Change-Id: Ic2a272c43f65eed8c4b3749787637f5fb848bb8a
Fix: 78113562
packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceController.java