orientAboutObject() currently determines whether the popup should align
its left side with the icon or the right side. However, after
determining this, there is an offset to ensure the popup lines up with
the icon as expected, which might push it out of bounds. In that case,
we fallback to centering the popup. However, there might be plenty of
room on the other side, so we should just align the other direction
instead. Updated the logic to do that by first trying to align left
(in LTR) or right (in RTL), then trying again with the other alignment
if it doesn't fit after all x calculations are made.
Bug: 150644839
Change-Id: I219dae331bf790e461d91394ffe025d40ec54c9b
This is to fix in Hierarchical animation (i.e. the animation will
reparent to parent container's surface control rather then a fixed
fullscreen animation layer),
TaskView surface in overview screen the position will be shifted
when entering split-screen mode.
Test: manual as follow steps:
- Launching app from launcher to split-screen secondary stack
- Swipe up to overview screen and drag TaskView to see if the TaskView
surface is shfted, expected is not.
Bug: 148780840
Change-Id: Ia7e9c2649ae3e35747859c211a4299198c16db00
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: Ifbd9f9351de21e02cdb75e950e4a97bd09d444a7
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I4f28951bc642a53fc59b60e00b0553e31f574f8a
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: Ib7b0f51a25316fe8a00641f9f8e53ec0d9b2a039
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: Iab53f4aa32bf361a355c2f70fb4b2346071d9963
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I3435054a9b89cec31f308d88d4c525ab6d804cb4
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I6f23fb9c1dccbddd39d9662ce022cbf397a850e5
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: Ie1d7cd93666c24846c07c4e7a08322d177ac979e
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I84dd70d097a5bf10750b093ada6358be977e77ff
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I58376243f311c0cb1472598bb9a83b10026c1cb4
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: Icab0a7cb318f5cab31c25a30033d5afb77cbbd36
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I7fe3046b70d3c71dfe4bc6736d69d368e457d7c7
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I504308ed2e4b6a970991bb5f135f1547bf551173
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 ecf9323831 is in history
Change-Id: I71b64b0c6d9ef5720884ebf70338facded7d5d04
am skip reason: Change-Id Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a with SHA-1 65ced1b1d0 is in history
Change-Id: I70904c253ac6ad36820069f64d9338ee067d159b
Test: Used Facebook chatheads (not system bubble).
Before the change, Home gesture didn't work. After
the change, it does work :)
Bug: 146593239
Merged-In: Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a
Change-Id: I19d91aaed19ccaec68478e364ce6b80049d49a98