Merge "Fixed a crash with the headsUpManager" into qt-dev am: fcd42e9249

am: 708890baf1

Change-Id: Ifd72614d7228750551e21ea96a4a31e67eb10dcd
This commit is contained in:
Selim Cinek
2019-07-19 17:54:21 -07:00
committed by android-build-merger

View File

@@ -363,12 +363,15 @@ public class HeadsUpManagerPhone extends HeadsUpManager implements Dumpable,
}
public Region calculateTouchableRegion() {
if (!hasPinnedHeadsUp()) {
NotificationEntry topEntry = getTopEntry();
// This call could be made in an inconsistent state while the pinnedMode hasn't been
// updated yet, but callbacks leading out of the headsUp manager, querying it. Let's
// therefore also check if the topEntry is null.
if (!hasPinnedHeadsUp() || topEntry == null) {
mTouchableRegion.set(0, 0, mStatusBarWindowView.getWidth(), mStatusBarHeight);
updateRegionForNotch(mTouchableRegion);
} else {
NotificationEntry topEntry = getTopEntry();
if (topEntry.isChildInGroup()) {
final NotificationEntry groupSummary =
mGroupManager.getGroupSummary(topEntry.notification);