Refactor common logic in bubble pin controllers to base class

Move exclusion rect calculation to base class. All subclasses for
pinning the bubble bar share the same logic. The exclusion rect sits at
the bottom center of the screen. Subclasses only need to provide size
as the resource ids are different between launcher and shell.
Move everything related to screen size calculation to the parent class.
Subclasses have to provide a callback to fetch the screen size. As this
is different in launcher vs shell.

Bug: 330585402
Test: atest WMShellRobolectricTests:BubbleExpandedViewPinControllerTest
Test: atest WMShellMultivalentTestsOnDevice:BubbleExpandedViewPinControllerTest
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: I2e52df9fa67b26413595371fcd92f360fdbbf7ad
2 files changed