62 Commits

Author SHA1 Message Date
kwaky
15fdf0158c DO NOT MERGE Enable hiding system bars by side when IME appears. am: a0e8b666e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12586399

Change-Id: I0a4309b3900a9701e1272f46cc3a75e308c8e235
2020-09-16 16:36:52 +00:00
kwaky
cc3dfbeeba DO NOT MERGE Fix subclass/superclass check for NotificationPanelViewMediator.
Bug: 165806308
Test: Manual + Unit Tests Passing
Change-Id: I8f443762f1b487ab9d3fe4f6f84b0aa86e3d0c8a
2020-09-15 15:51:26 -07:00
kwaky
a0e8b666e4 DO NOT MERGE Enable hiding system bars by side when IME appears.
Bug: 167593045
Test: Manual + Unit Tests
Change-Id: Ib0c2c70e2df361f5cce156315c7fd4ae489ae279
2020-09-15 15:12:13 -07:00
Heemin Seog
b6f4a0c672 DO NOT MERGE Adjust window focusable by view controller
Some adjustments to note:
1. remove previous focusability changes per view controller
2. disallow calling insetsController.show/hide without window focus
3. update tests to depend on window focus
4. update DisplaySystemBarsController to refer to parent class for ime
insets

Bug: 163135884
Test: manual, atest :carsysui-presubmit
Change-Id: If5adf599bc2c676ad296f89566534c1fdc9f2492
2020-09-08 21:27:17 +00:00
kwaky
4a6f9b9721 Fix AAOS SystemUI Presubmit tests that are breaking.
Due to the newly added check in SystemBarConfig, tests can fail
erroneously when testing behavior of when either top or bottom system
bar is not enabled.

Bug: 162599873
Bug: 165808744
Test: atest carsysui-presubmit --include-subdir passing. (5/5)
Change-Id: Ife2ac4e746006c39eaf46cd0328c1639149891b2
Merged-In: Ife2ac4e746006c39eaf46cd0328c1639149891b2
2020-08-31 23:38:15 +00:00
Youngjun Kwak
96540963a8 Merge "Fix flaky test in ConnectedDeviceVoiceRecognitionNotifierTest." into rvc-qpr-dev 2020-08-05 16:10:53 +00:00
kwaky
2bc72aa87f Fix flaky test in ConnectedDeviceVoiceRecognitionNotifierTest.
Bug: 161892451
Test: atest ConnectedDeviceVoiceRecognitionNotifierTest now passes
without flakiness (10/10)

Change-Id: I95acf0fdbfa7ff1bf6bf02f7c3defbed27510250
2020-08-04 13:49:26 -07:00
TreeHugger Robot
82abf1c4cd Merge "Fix SideLoadedAppListenerTest" into rvc-qpr-dev 2020-08-01 01:48:45 +00:00
kwaky
01e7567c22 Fix SideLoadedAppListenerTest
Display2 is expected to return stack info that is not safe, and so it is
expected that onUnSafeTaskDisplayedOnDisplay is called for it.

Bug: 161892451
Test: Unit Test
Change-Id: I3e3afbadff4cb2fc252c5b0d4fe32bd9ce19097a
2020-07-31 17:04:26 -07:00
kwaky
ff69d4bf4c Fix UserSwitchTransitionViewMediatorTest
First, it has to extend SystemUiTestCase to pass AAAPlusPlusVerify Test.
Second, CarDeviceProvisionedController is injected into the Mediator and
mocked in its test to correctly test case where the user life cycle
event is being applied to the current user and a case when it is not.

Bug: 161892451
Test: Unit Test (the corresponding tests passing now.)
Change-Id: I8be7dacaa1bf0abb87dcb357c37e58ce511132d2
2020-07-31 16:49:24 -07:00
kwaky
4030db5f0d Allow SystemBar configuration via XML.
Bug: 160028073
Bug: 161825538
Test: Unit Tests + Manual -- CarNavigationBar reads configs from
SystemBarConfigs and applies them as intended. It throws an error when
the config validation fails.

Change-Id: If1575bdc2549058600fb80fa0d6c340fd3e1dbc5
2020-07-29 09:18:31 -07:00
Abhijoy Saha
f0988b92e2 Improve SystemUIOverlayWindow control
1. Make sysui overlay window views more stable
2. hide/show system bars using insets in SystemUIOverlayWindow

Bug: 161926721
Bug: 151617493
Test: Manual & Unit Tests
Change-Id: I78fd2b5e8488d2f5006edd9773308e2bb9856d2b
2020-07-23 16:01:43 -07:00
kwaky
078be01072 DO NOT MERGE Annotate CarSystemUiTests to be run for AAOS pre-submit.
Bug: 144452110
Test: atest :carsysui-presubmit under packages/CarSystemUI directory.
Change-Id: Icec563e6dc2ee4ad27a8a961caa1ffd97ce68d54
2020-07-14 14:13:04 -07:00
Heemin Seog
ff1cbcc780 Merge "Fix ConnectedDeviceVoiceRecognitoinNotifierTest" into rvc-qpr-dev 2020-07-09 16:21:31 +00:00
JianYang Liu
2c403a6526 Added systemui controller to control system bars.
When config_remoteInsetsControllerControlsSystemBars is true,
DisplaySystemBarsController provides its own policy of how system
bars are displayed for specific packages. Currently limited to
only auto versions of Android.

Bug: 149585273
Test: Manual, atest BarControlPolicyTest, atest InsetsPolicyTest,
      atest DisplaySystemBarsControllerTest
Change-Id: Ie6b1cc3e2760cbc9e48d62dfbd8bc3e23ffca20c
Merged-In: Ie6b1cc3e2760cbc9e48d62dfbd8bc3e23ffca20c
2020-07-08 23:06:14 +00:00
Babak
75b16ca6cf Fix ConnectedDeviceVoiceRecognitoinNotifierTest
- Adds bluetooth device to the intent since it is required by other
receivers which can cause issues if test is running while other receivers
are listening for the bluetooth broadcast.
- Fixes a potential flakiness by making sure the looper processes all the
messages.

Fix: 154515909
Test: Manual

Change-Id: Ib9c6f9eed20336cafcf9d984edd60eb311195e5e
2020-06-29 23:36:20 +00:00
JianYang Liu
44a0184909 Updated NotificationPanelViewController to listen to
animateExpandNotificationsPanel and animateCollapsePanels.

Callbacks necessary for legacy notification system. Also added
notification visibility reporter.

Bug: 152056864
Test: atest NotificationAssistantServiceTest
Change-Id: I8fa114824a54c06babd8bda2b789a6a16cd52357
2020-06-19 14:07:03 -07:00
kwaky
12930e8ddc Hide UserSwitchTransitionView if it is not hidden within timeout.
This prevents being stuck in the Loading screen even if the proper
User Lifecycle event was not broadcast.

Test: Unit Tests + Manual -- Verify that the UserSwitchTransitionView is
hidden after the timeout threshold when the UserLifecycleEvent listener
is not registered.
Bug: 158705895

Change-Id: I895f04bda395bac271b01fbb414a8bf484348324
2020-06-12 14:01:24 -07:00
Heemin Seog
4e47cb8feb Notify window manager service that we are switching users
Bug: 158617677
Test: manual (try user switching on emulator)
Change-Id: Ia04e887846bce6047973d6db094e97a6515715fe
2020-06-11 08:50:08 -07:00
TreeHugger Robot
8920f765c9 Merge "Add occlusion logic to OverlayViewGlobalStateController and CarKeyguardViewController" into rvc-dev 2020-06-03 04:12:06 +00:00
kwaky
5dc67de144 Add occlusion logic to OverlayViewGlobalStateController and CarKeyguardViewController
Activity has a public API setShowWhenLocked, which, if set to true,
allows it to be shown when the device is locked, thereby "occluding"
the Keyguard.

In the Phone OS implementation, when an occluding Activity is showing,
Keyguard is temporarily dismissed and StatusBar expands.

In the AAOS implementation where SystemUI components are mounted to
the SystemUIOverlayWindow, OverlayViewGlobalStateController hides all
views mounted to it unless they are configured to be shown even during
occlusion.

Test: Unit Tests + atest CtsWindowManagerDeviceTestCases:ActivityLifecycleTopResumedStateTests#testTopPositionLaunchedOnTopOfLockScreen
Bug: 156781505
Change-Id: I8320e97a575a990ba4301729c6b0e6c86d6ef7c5
2020-06-02 19:47:13 -07:00
Danny Epstein
5a3e17d153 Add rotary support to the nav bar and HUN.
Add a FocusParkingView to the navigation bar and the heads-up
notification window. Add a dependency on the Chassis UI library.
Make the nav buttons have a blue background, or whatever color
the OEM specifies for the focus highlight.

Test: atest com.android.systemui.car.navigationbar.CarNavigationButtonTest
Bug: 155681517
Change-Id: Ia33c7692554c15427e429ecdba3bc978224ff129
2020-06-02 12:10:52 -07:00
Roberto Perez
555acefb22 Make assistant button display the icon of the role holder application
Bug: 152335571
Test: Manual on emulator
Change-Id: Ife996a5f3fa4e7dcc403c2ec52758d56ea67a786
2020-05-20 17:18:04 -07:00
kwaky
3911339b66 Implement UserSwitchingDialog in SystemUI mounted to OverlayWindow.
Bug: 145132885
Test: Manual + Unit Tests
Change-Id: I9eab89ddd54f9484e9bd79fc867c09ef4a17fe46
2020-05-15 13:45:37 -07:00
TreeHugger Robot
b4f62e7fd8 Merge "Updated CarNavigationBar to update status bar icon appearance on start." into rvc-dev 2020-05-13 03:03:50 +00:00
JianYang Liu
55eb9c0c8e Fixed AAAPlusPlusVerifySysuiRequiredTestPropertiesTest broken by missing
annotation in CarKeyguardViewControllerTest.

Bug: 156115497
Test: atest AAAPlusPlusVerifySysuiRequiredTestPropertiesTest
Change-Id: I750ced1c04d6fb3f09f1580c7f7dc0b332626b8f
2020-05-08 13:52:08 -07:00
JianYang Liu
0e3c478fab Updated CarNavigationBar to update status bar icon appearance on start.
Bug: 155664476
Test: Manual, atest CarNavigationBarTest
Change-Id: I83dac7499c8bdcb5570df6c33f483f4928fe6549
2020-05-08 10:18:44 -07:00
Abhijoy Saha
4785a0669a Merge "Allow HUNs to be shown over Overlay Window." into rvc-dev 2020-05-07 00:27:01 +00:00
Abhijoy Saha
3645184a97 Allow HUNs to be shown over Overlay Window.
Bug: 151832454
Test: Manual, Unit Tests
Change-Id: I7d8102eba5fecc060f9570e5da4223dfe8c68802
2020-05-06 14:07:53 -07:00
Heemin Seog
4860f80743 Use UiBgExecutor instead of background handler
Also add a few logging statements to help track down the issue.

Bug: 155334879
Test: manual, atest CarNavigationBarTest
Change-Id: I80c264e7ec0042257bfba3feb6cce6eadced5098
2020-05-05 00:24:33 -07:00
Heemin Seog
a3d358f277 Lazy load status icon related components
PhoneStatusBarPolicy is a complex object with many underlying
dependencies. Lazy load until there is a better story around it.

Bug: 147455109
Test: manual (systrace)
Change-Id: I726a797f37c0816ab189a4c5f4fd5eecb0692e53
2020-04-28 22:41:54 -07:00
TreeHugger Robot
261f1cafc6 Merge "Lazy load BiometricUnlockController" into rvc-dev 2020-04-28 18:20:16 +00:00
Heemin Seog
09970f4101 Lazy load BiometricUnlockController
This one also includes other big dependencies like StatusBar,
NotificationShadeWindowController, ShadeController, and more.

Bug: 147455109
Test: manual (with timing from SystemUIOverlayWindowManager)
Change-Id: I7d8f1a92e66860ea278c062af873665b1b8e47b0
2020-04-28 09:24:58 -07:00
Heemin Seog
23f18d0771 Connect to hvac in background thread, post status icons init
Bug: 147455109
Test: manual with systrace
Change-Id: I82c7cbdb4e8693123092566e1822db95738e2017
2020-04-27 11:11:22 -07:00
Jian-Yang Liu
c65d2c3e06 Merge "Updated OverlayPanelViewController to allow for showing overlay panel from the bottom navigation bar." into rvc-dev 2020-04-25 21:14:55 +00:00
JianYang Liu
2d922fb64b Updated OverlayPanelViewController to allow for showing overlay panel
from the bottom navigation bar.

Added Top and Bottom NotificationPanelViewMediators that can be used to
change the direction that the notification panel should go in.

Bug: 145827692
Test: Manual
Change-Id: I813415711f826a70cdbf4bd16e9b4f425e81e0de
2020-04-24 23:12:51 +00:00
Babak
16648affdd Add side loaded listener and controller
- Add SideLoadedAppController as a SysUI class to kick off the
sideloaded app tracking.
- Add SideLoadedAppStateController to manage the state of sideloaded
apps. This class is just a wireframe and will be filled in the following
cls.
- Add SideLoadedAppListener to listen for stack changes and notify the
state controller when the sideloaded apps state changes.
- Add unit test for SideLoadedAppListener

Bug: 154263570
Test: atest (All tests in CarSystemUITests)

Change-Id: I8d2b9b3d224017d9a51e2590a1aae0a9a265f7c3
2020-04-23 14:00:43 -07:00
Heemin Seog
9b078d3548 Move navigation bar, windows, and statusbar related classes
Move to some package under com.android.systemui.car

Bug: 154357193
Test: manual
Change-Id: I6afa42750398f0f190e9e18080ff5aeb67c9e66b
2020-04-22 16:06:28 -07:00
Heemin Seog
9848ee32b3 Address multi display nav bar crash
Bug: 154551107
Test: manual
Change-Id: I147a771f46fa10642e560b504f027a91e76ea723
2020-04-21 22:59:33 -07:00
Heemin Seog
51a863301b Move things to com.android.systemui.car
Bug: 154357193
Test: atest (all tests in CarSystemUITests)
Change-Id: I897480b79c9c6dbf5e93b9eb869fe0acec77c598
2020-04-21 14:07:22 -07:00
Heemin Seog
bb36619129 Merge "Remove CarStatusBar reference from HUNs container" into rvc-dev 2020-04-21 20:27:00 +00:00
Heemin Seog
4acb971f6c Remove CarStatusBar reference from HUNs container
Bug: 154357193
Test: manual, atest CarHeadsUpNotificationSystemContainerTest
Change-Id: I9cdf393eab5dc5b4d6ba5448e0a2c2316ef7a191
2020-04-21 11:26:43 -07:00
Heemin Seog
24f3fd4b95 Remove unnecessary dependencies
This wasn't previously possible due to ties to StatusBar.java - however
since we've restructured it in a different way, we can pull out these
dependencies

Bug: 147455109
Test: manual
Change-Id: Ica8f288cd9b54742383a1c4e02b53f08f0da3e1b
2020-04-21 08:59:40 -07:00
TreeHugger Robot
daf2d9b2b5 Merge "Add Sideloaded detector" into rvc-dev 2020-04-18 00:15:37 +00:00
Heemin Seog
463b1fa2be Merge "Move status bar to CarNavigationBar" into rvc-dev 2020-04-17 22:27:58 +00:00
Babak
151a5643bd Add Sideloaded detector
A helper class to detect if any package is unsafe or sideloaded.
A package is considered unsafe if not a system app and not installed
through trusted sources.
The usage will be added in the following cls.

Bug: 154263570
Test: Added UnitTest
Change-Id: Ifffbe64ae95029427aeca4a997bc440dbdc2d3d6
2020-04-17 14:52:06 -07:00
Heemin Seog
29ecf61c46 Move status bar to CarNavigationBar
This also allows us to remove CarStatusBar.java (note that
CarStatusBar.java may still be instantiated via injection into other
Phone SysUI dependencies).

Bug: 147455109
Test: manual, atest CarNavigationBarTest CarNavigationBarControllerTest
Change-Id: Ic9f40c0662ae4ab3195f71ecebe91ba5cf2a7b22
2020-04-16 17:18:57 -07:00
kwaky
e31cf5d3c0 Add test coverage for CarKeyguardViewController
Bug: 153659489
Test: Unit Tests
Change-Id: Iaebf95d902ba29cbe06fa9571f8a3d63629dd043
2020-04-14 17:50:02 -07:00
Heemin Seog
df741ac850 Generalize notifications logic into a subclass of OverlayViewController
Bug: 147826363
Test: manual, atest OverlayPanelViewControllerTest
Change-Id: Ifad23f6ff639390077301eafa737fea8517a48d9
2020-04-08 17:22:00 -07:00
Heemin Seog
cbb774dc6e Allow nav bar to consume touch events based on configuration
This is particularly useful for OEMs that want to ensure that OEMs can
override the touch behavior of the system bars without impacting the
notification panel touch behavior.

Bug: 150613278
Test: manual, atest CarNavigationBarViewTest
Change-Id: Icb5ae3388f4004b4f465e9a9e85e8d175bbe7d78
2020-04-03 16:38:24 -07:00