Use display context to inflate navbar on external display
- Disable rotation suggestion button if the navbar is on
non-default display because there is no accelerometer sensor.
- Avoid leakage by removing navbar fragment from fragment
host when display is removed.
Bug: 117746225
Bug: 117744614
Test: atest SystemUITests
Test: manual - create a virtual display with system decoration.
The navbar on the virtual display should not change when
rotating or changing density of default display.
And after releasing the display, use command "dumpsys
activity service com.android.systemui/.SystemUIService |
grep NavigationBarFragment" to check the number of instances.
Change-Id: Icdc8634628ace21395b7eb9d77c6b1067850d1b2
6 files changed