Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9130e7d authored by Ben Lin's avatar Ben Lin
Browse files

Heads-Up Notification: Update touchable region correctly.

This assumes HUN is always at the top (y-position = 0), but on Desktop
devices this is not the case since HUN is at the bottom. Update the
y-position accordingly.

Test: Tapping on the HUN works again
Bug: 221275739
Change-Id: Ic31ecc0f3151f9749e91f720f97afc8a85cb2eb6
parent ee28ca0a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -176,7 +176,8 @@ public class HeadsUpManagerPhone extends HeadsUpManager implements Dumpable,
            int minX = tmpArray[0];
            int maxX = tmpArray[0] + topRow.getWidth();
            int height = topRow.getIntrinsicHeight();
            mTouchableRegion.set(minX, 0, maxX, mHeadsUpInset + height);
            final boolean stretchToTop = tmpArray[1] <= mHeadsUpInset;
            mTouchableRegion.set(minX, stretchToTop ? 0 : tmpArray[1], maxX, tmpArray[1] + height);
            return mTouchableRegion;
        }
    }