History log of /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e2cf7c8a8ccd289a6f505adbeac5fc3c47e2e1ed 25-May-2018 felkachang <felkachang@google.com> Fix text is cut off in corner cut out condition

There is a todo that it needs to handle the corner cut out. In the
condition of RTL and Corner Cut out, HeadsUpStatusBarView's padding
is wrong because displayCutout.getSafeInsetRight() is 0 but corner
cut out actually impact HeadsUpStatusBar's layout. Corner cut out
make icon's start more big but mCutOutInset is 0 so the newPadding
is a negative number.

The handle method is to detect the part of overlaying with corner
cut out. i.e. center cut out is exclude. To count the cut out start
as cutOutStart and compare cutOutStart with icon's start. The cut
out is not corner cut out if cutOutStart < icon's start.

icon's minus the width of overlay part to prevent from negative
padding.

move the get screen size from onLayout to fitSystemWindows and
onAttachToWindow because there is a chance to new object in
onLayout. To new object in onLayout is not good practice. And,
there is an chance to invoke ANR because Display.getRealSize() may
do IPC.

Fixes: 80271465
Test: atest SystemUITests
Change-Id: I36fa5c880f5e624747133e46950c1c1695a5fa58
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java
3d00f35c758ce3b4f04f626e5711e6710cb1b8b0 21-May-2018 felkachang <felkachang@google.com> Fix fullscreen notification to support RTL

In the FullScreen notification condition, HeadsUpStatusBarView
doesn't support RTL funcationality and show nothing on status bar.

There are three part need to support RTL:
* HeadsUpAppearanceController count translationX
* HeadsUpStatusBarView count the new padding start
* Consider more about the SystemWindow(Navigation Bar + cut out)

In normal case(LTR), to count the new padding start needs to know
both of the NavigationBar's width and cut out in the left hand
side. But, in RTL, to count the new Padding start needs to know both
of the NavigationBar's width and cut out in the right hand side.
To change from mLeftInset to mSysWinInset and from mLeftCutOutInset
to mCutOutInset.

Add HeadsUpAppearanceController.getRtlTranslation to count the RTL
tranlationX by the following formula:
Y = screenSize - (SystemWindow's width + Scroller.getRight())
And, let HeadsUpStatusBarView.setPanelTranslation to handle the
right cut out width and then complete the real
HeadsUpStatusBarView.setTranslationX.

Bug: 79957423
Test: atest SystemUITests
Change-Id: I26b3cf8a73a2bcd2916847d72e66c16ca9063efd
Fix: 79957423
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java
e8a3536660bd783acec41a1785f425a1d357c69c 18-May-2018 felkachang <felkachang@google.com> 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
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java
332c23fe4b1c6750e0fc561e74d6bff8219bc761 17-Mar-2018 Selim Cinek <cinek@google.com> Added new appear and disappear animations for heads up

The heads up notifications now appear directly out of the
statusbar icon in a smoother way. This also fixes the
landscape presentation, which was completely wrong
before.

Test: runtest systemui
Change-Id: I84e65d5216f74a9eb1717d3e7c111d66c0b43c65
Fixes: 72748440
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java
aa9db1f34fe8b4a2d143c1379ec6c0c304bbd40b 28-Feb-2018 Selim Cinek <cinek@google.com> Insetting heads up notifications

Heads up notifications are now corretly respecting insets.
instead of overlapping with any possible notches, we're
insetting heads up notifications and splitting the main
content from the header.

Fixes: 72748440
Test: runtest systemui
Change-Id: Ie53ea31fef4e468239c4346f9d1f192bcb26e11d
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java