Skip to content
Commit ed86a623 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix weird shelf truncation when only media can show.

The root cause of the rendering issue was that the NotificationShelf's NotificationBackgroundView had an mBackgroundTop value of -5 which caused its shape to be truncated. This was a feature that was part of the old dyson animation (when transitioning from the statusBar to the shelf when pulling down the shade) that is no longer needed, and which was causing this bug that only became visible given the more rounded corners.

This CL removes a bunch of unused code:
* The NotificationShelf's firstElementRoundness was set but never used, and could be trivially deleted.
* setBackgroundTop() on ExpandableOutlineView was only called on NotificationShelf instances, but it was overridden by ActivatableNotificationRow.
* The only place where ActivatableNotificationRow.setBackgroundTop() was called was the the deleted logic in the shelf.  This feature seems to have been related to the initial phases of the StatusBar-to-shade dyson animation which used to exist on R, but has been removed.
* NotificationBackgroundView.setBackgroundTop() was only used by the last method, so it could be deleted.

I also added some developer-toggleable dump() improvements for ExpandableView and its subclasses.  Note that ExpandableNotificationRow simply does not call these superclass methods.  Regardless, these intermediate subclasses do print information for NotificationShelf and NotificationFooter and other similar views.  These dumps allowed me to diagnose the root cause of this bug, but do not provide sufficient value to merit includion in the bugreport.  The only exception to that is that I left the new Roundness dump from ExpandableOutlineView, since that does indeed apply, and was not previously printed.

Fixes: 236091099
Test: set the config resource keyguard_max_notification_count to 1, show media on lockscreen.
Change-Id: I4ff4c72e542aefd993322bcc54b174ebc086c404
parent ef056c36
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