Commit Graph

407 Commits

Author SHA1 Message Date
Charles Chen
eb0ebddc1a Merge "Split status bar window (1/N)" 2020-01-20 17:23:36 +00:00
Calvin Huang
165bf8f44a Set overlayable for CarsystemUI NavBar
Bug: 142822006
Test: Nav icons should be hidden accordingly
Change-Id: I88d954c03076dfa9489564e0a9684be265f4c886
2020-01-17 13:33:48 -08:00
wilsonshih
e832194dd0 Split status bar window (1/N)
This is the first step to create another new window for status bar.

Small window => TYPE_STATUS_BAR: The bar on top of screen.
Large window => TYPE_NOTIFICATION_SHADE: Anything else.

Bug: 136993073
Test: build then flash
Test: atest WmTests SystemUITests
Test: atest RegisterStatusBarResultTest InsetsFlagsTest

Manual Test:
- Bouncer can show when leave showWhenLocked activity.
- StatusBar can show when comes HUN in fullscreen mode.
- StatusBar can play enter/leave animation in fullscreen mode.
- Able to drag notification panel when bubble/glow existing.
- Switch to market launcher, and run above tests.
- Drag notification panel from launcher several times and observe it
  works fine.

Change-Id: Id9f72cd0e21f01b50d57f02ea60f97c6460926b7
2020-01-17 15:33:56 +00:00
Heemin Seog
886d97633a Merge "User switcher in primary sysui window" 2020-01-14 18:57:02 +00:00
Ned Burns
c0cd28332f Rename NotifListBuilderImpl and NewNotifPipeline
Minor cleanup to better reflect their reponsibilities:

NotifListBuilderImpl -> ShadeListBuilder
NewNotifPipeline -> NotifPipelineInitializer

Test: atest
Change-Id: Ib4cd5f06567129e5720fdcd17ef9a9bc0dcf577b
2020-01-13 22:35:22 -05:00
Heemin Seog
193c7167d5 Merge "Create a new window to host car specific sysui" 2020-01-13 17:03:06 +00:00
Heemin Seog
17134e2953 User switcher in primary sysui window
Bug: 147495368
Test: manual (add security, reboot, add new user, reboot)
Change-Id: I638f57de2e9117a1cb5aa6660d5a03b58894d31f
2020-01-10 14:47:02 -08:00
Heemin Seog
d9af298b18 Create a new window to host car specific sysui
Currently we're using STATUS_BAR_SUB_PANEL windowing layer, but we'll
need to revisit this in the future.

Also the height is calculated by appending the height of the navigation
bar. We'll also need to discuss with the windowing team on how to get
the full height of the display using MATCH_PARENT.

Bug: 147455109
Test: manual (test that the window can hold content with a test screen)
Change-Id: I3b821ec0382515804a4ee80396f15d608467efdf
2020-01-10 14:45:53 -08:00
Dave Mankoff
02dcaf5347 Make NotificationRowBinder injectable.
Part of prepatory work for changes coming to
ActivatableNotificationView.

Bug: 147245740
Test: atest SystemUITests
Change-Id: Id85767ab3365e0da659941f267b5d925d6da9dd9
2020-01-10 13:39:04 -05:00
Dan Sandler
dc4c1003a8 Revert "Convert NotificationContentInflater to singleton"
This reverts commit 8b6968328d.

Bug: 147407617
Change-Id: I6208344a26069239e47665710dd2fea93136ab95
2020-01-09 15:18:23 +00:00
Kevin Han
8b6968328d Convert NotificationContentInflater to singleton
Convert NotificationContentInflater into a singleton since it has
almost no state, making it easier to inject and re-use.

Move the only per-row state it has, cached remote views, to a separate
class NotifRemoteViewCacheImpl that manages the lifetime of the cached
remote views based off the notification's lifecycle. This has the added
benefit of being re-usable for content recycling later on.

Bug: 145749521
Test: atest SystemUITests
Test: atest NotificationContentInflaterTest w/o @Suppress locally
Test: smoke test
Change-Id: Iedda71d7e5edea9e30580e99eb5b6ec545bb708d
2020-01-08 14:21:21 -08:00
Dave Mankoff
af8163f77d Revert "Revert "Refactor PanelView and NotificationPanelView into Controllers.""
This reverts commit da13c3fd3d.

This includes a fix for the original issue - an NPE in
NotificationPanelView.

Bug: 147295216
Change-Id: Id1a71b0e30aada460a70d738c5451e21dd412a7a
Test: atest SystemUITests
2020-01-08 14:55:19 -05:00
Zhuoyao Zhang
b2c90b1e3c Merge "Revert "Refactor PanelView and NotificationPanelView into Controllers."" 2020-01-08 18:53:06 +00:00
Zhuoyao Zhang
da13c3fd3d Revert "Refactor PanelView and NotificationPanelView into Controllers."
Revert "NoticationPanelView now has a controller."

Revert submission 9930899-b141751146-npv-controller

Reason for revert: b/147295216
Reverted Changes:
I9a92cad63: Refactor PanelView and NotificationPanelView into ...
I454bc4790: NoticationPanelView now has a controller.

Change-Id: Iae9db40e9385e1b88bd2f5f162a5f6d53d91878d
2020-01-08 18:30:30 +00:00
Beverly Tai
182306a20f Merge "Use PreparationCoordinator to inflate notifs" 2020-01-08 14:16:25 +00:00
kwaky
34c6bdee7e Support Unseen Indicator Icon in all CarNavigationButtons
Bug: 146508662
Test: Manual + Unit Tests
Change-Id: I464f4f080f739923492daf2715753e3892ada7dd
2020-01-07 15:44:13 -08:00
Beverly
8b493dfbb3 Use PreparationCoordinator to inflate notifs
In the (old/current) notification pipeline, NotificationEntryManager
handles inflating views.  In the NewNotifPipeline, PreparationCoordinator
will trigger inflation via a NotifInflater and will keep track
of what is/isn't inflated.

If a notification isn't done inflating, then the PreparationCoordinator
will filter it from the NotifListBuilder.

Test: atest SystemUiTests
Change-Id: I7a5c01041312ff179e8c723f66207b3bd042c857
2020-01-07 16:21:38 -05:00
TreeHugger Robot
45328cdf42 Merge "Make onClickListener and onLongClickListener overridable" 2020-01-07 17:54:22 +00:00
TreeHugger Robot
c7ce0f2dde Merge changes from topic "aae_navbutton_refactor"
* changes:
  Move attrs_car from SysUI to attrs in CarSystemUI
  Merge CarFacetButton and CarNavigationButton into a single class and add test coverage
2020-01-07 17:54:22 +00:00
Dave Mankoff
59b9496c7b Refactor PanelView and NotificationPanelView into Controllers.
Bug: 141751146
Test: atest SystemUITests
Change-Id: I9a92cad636e30634ac5b1fa16121d320991492c2
2020-01-06 14:56:26 -05:00
Dave Mankoff
9febfeb097 Disable falsing when resting on a Dock.
Fix typo: Classifer -> Classifier.

Use Executor instead of Handler in falsing related code.

Show a dump of BrightLingFalsing related information.

Bug: 139785197
Test: atest SystemUITests && manual.
Change-Id: I3be68cb9f27ccfb5a686947cc85aae74f21f099c
2020-01-03 15:21:04 -05:00
Dave Mankoff
fa861bfc4e Pass UserInfoControllerImpl into StatusBar.
Bug: 141882822
Test: atest SystemUITests

Change-Id: I5037985026a029c7d00cf63f5adab959ed334637
2019-12-26 16:07:05 -05:00
Dave Mankoff
facd72f1c0 Pass ExtensionController into StatusBar.
Bug: 141882822
Test: atest SystemUITests

Change-Id: I5d96586650a1fc6cbfa0c645a306c9ebe1739eff
2019-12-26 15:41:58 -05:00
Dave Mankoff
003718b443 Pass KeyguardDismissUtil into StatusBar.
Bug: 141882822
Test: atest SystemUITests

Change-Id: Icd9fb0254dfb392fc7803064c5ec09add4dc07d7
2019-12-26 15:21:17 -05:00
Dave Mankoff
2c2ba3c7d1 Pass PluginDependencyProvider into StatusBar.
Bug: 141882822
Test: atest SystemUITests
Change-Id: Iec8cc841495785b45c7b76eac0b1aacc520d999c
2019-12-26 15:06:15 -05:00
Dave Mankoff
1063eccd69 Merge changes from topic "b141882822-sb-dependency-get"
* changes:
  Inject a time-tick handler.
  Inject DarkIconDispatcher into StatusBar
  Replace Dependency.get() calls with existing member variables.
2019-12-26 19:04:52 +00:00
TreeHugger Robot
60e15a453a Merge "Consolidate Divider Provider" 2019-12-26 18:27:38 +00:00
TreeHugger Robot
47445e42e6 Merge "Refresh notifications on language change" 2019-12-26 18:15:54 +00:00
kwaky
7e39da0345 Make onClickListener and onLongClickListener overridable
Bug: 146507589
Test: Builds and Manual/Unit Tests still passing
Change-Id: Idc297db9baf8365325940a570f6997ff33c7baec
2019-12-23 17:01:54 -08:00
kwaky
54bef9dd11 Move attrs_car from SysUI to attrs in CarSystemUI
Bug: 146513202
Test: Build, Manual, and Unit Tests still passing
Change-Id: Idd6e58e27e6de909ba20481513112b9abd689571
2019-12-23 17:00:29 -08:00
kwaky
77d81dc6ac Merge CarFacetButton and CarNavigationButton into a single class and add test coverage
Test: Manual - Manually verified that navigation button functionalities are working as expected.
      Unit Tests
Bug: 145827784
Bug: 145604656

Change-Id: Ib8f837ba34afbb8d66092a8b851b93c50fa20b26
2019-12-23 16:58:17 -08:00
Dave Mankoff
36403e79d3 Inject a time-tick handler.
Bug: 141882822
Test: atest SystemUITests
Change-Id: I5b01cab803bc58362c22270069200bf7722b4c17
2019-12-23 17:48:21 -05:00
Dave Mankoff
a0da22d0df Inject DarkIconDispatcher into StatusBar
Bug: 141882822
Test: atest SystemUITests
Change-Id: I35427de4bd19b1694a32f95f76bcb71dda349eea
2019-12-23 17:40:30 -05:00
Heemin Seog
991a07605a Refresh notifications on language change
Bug: 146163621
Test: manual
Change-Id: Id60df4c865d7aba03816df63c39933db2942352b
2019-12-23 11:16:45 -08:00
Dave Mankoff
71fca1a856 Remove Dependency.get(InitController.class)
Bug: 141882822
Test: atest SystemUITests
Change-Id: I3a7fbee69b08abffefc56b722c1753cb733eb528
2019-12-23 13:04:04 -05:00
Dave Mankoff
c7cf9fc1de Start removing Dependency.get(UiOffloadThread.class)
This actually begins the process of deprecation and removing
UiOffloadThread in favor of using Executors directly.

This CL hits the easiest spots in the code. There are a few
more remaining calls that should be in their own independent CLs.

Bug: 146567476
Test: atest SystemUITests
Change-Id: I2542cc61653f330a1931b15a57e3b7c77d18e2e6
2019-12-23 09:35:44 -05:00
Evan Rosky
cf05fd9dba Consolidate Divider Provider
Bug: 146670576
Test: builds/runs
Change-Id: Ib5ca2cb73d7e453940fb2e07dd7a6dcfa12c00ce
2019-12-20 14:10:48 -08:00
Dave Mankoff
00e8a2fa8d Conslidate @MainHandler and similar to @Main (and similar).
@MainHandler, @MainLooper, @MainResources -> @Main
@BgHandler, @BgLooper -> @Background.

Also, move the providers for Handlers and Loopers into the
ConcurrencyModule.

Bug: 146510722
Test: atest SystemUITests
Change-Id: I991735e1fdca397784427409a2ae696a7374f584
2019-12-20 16:35:42 -05:00
TreeHugger Robot
12eed538bd Merge "Set CarSysUI unprovisioned state depending on SUW progress." 2019-12-19 02:32:47 +00:00
TreeHugger Robot
a1d5731beb Merge "Move SystemUI to /system_ext" 2019-12-19 02:17:02 +00:00
TreeHugger Robot
712a45f03e Merge "FlingAnimationUtils now takes DisplayMetrics, not Context." 2019-12-19 02:13:36 +00:00
Abhijoy Saha
ee51369bda Set CarSysUI unprovisioned state depending on SUW progress.
Use a controller to monitor KEY_SETUP_WIZARD_IN_PROGRESS and USER_SETUP_COMPLETE
flags to know when to set CarSysUI bars in an unprovisioned state and prevent
interactions with notification shade.

Bug: 145616123
Test: Manual
Change-Id: Ie035f049e3e9e7cb411fc9553a20e4c09078c121
2019-12-18 16:21:55 -08:00
Dave Mankoff
1373fdb31d FlingAnimationUtils now takes DisplayMetrics, not Context.
Bug: 146496319
Test: atestSystemUITests && manual
Change-Id: I5a400d2ac500d044d50a878a5b2e5aa7f304628a
2019-12-18 14:06:08 -05:00
Eric Berglund
1498d7d3a3 Removing unneeded telephony-common dependency.
Bug: 143558721
Test: builds locally
Change-Id: I78ada3d72803f7547e72cb1e711e59b4ce741bda
2019-12-17 12:28:52 -08:00
Jeongik Cha
d45d9e111b Move SystemUI to /system_ext
we plan to forbid hidden API in product partition.
So this app should be moved to /system_ext because it uses hidden API.
It is not permanent, so they can be moved back to /product due to
needs if there isn't hidden usage anymore.

Bug: 137908189
Test: m
Test: check whether device boots successfully
Test: atest SystemUITests
Change-Id: I54f86496d4a0045af3576091cce00e5cd285b4f8
2019-12-17 07:19:45 +00:00
Jovana Knezevic
f81a6cf69f Merge "Cleans up user info creation in UserGridRecyclerView." 2019-12-16 20:54:41 +00:00
Tiger Huang
4a7835ffb6 Window Manager Flag Migration (7/n)
Introduce new APIs in Window/WindowManager.LayoutParams for developers
to decide which types of insets at which side a window should avoid:

    setFitWindowInsetsTypes(@InsetsType int types)
    setFitWindowInsetsSides(@InsetsSide int sides)
    setFitIgnoreVisibility(boolean ignore)

The existing logic in DisplayPolicy.layoutWindowLw uses combinations of
window types, window flags, and system UI flags to decide what frames a
window should have, which is very complex, difficult to maintain, and
should be replaced with the new APIs.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
            ViewRootImplTest DisplayPolicyLayoutTests
            DisplayPolicyInsetsTests DisplayPolicyTests
            TaskSnapshotSurfaceTest
Change-Id: I06ddc9d0d2887ba4ded7bb8adbf9c9c0da4bf7b4
2019-12-16 17:08:21 +08:00
Heemin Seog
46fab815a7 Merge "Make fixes to make sysui more customizable" 2019-12-13 17:29:36 +00:00
jovanak
e44dde31c4 Cleans up user info creation in UserGridRecyclerView.
UserGridRecyclerView shouldn't be creating UserInfo objects, especially not fake
ones that only serve as placeholder for a String. Guest and Add User buttons in
the user switcher don't correspond to real users, and as such, shouldn't be tied
to UserInfo objects.

This can also lead to bugs because consumers of UserRecord assume UserInfo
corresponds to a real user.

Instead we pass null in these cases, and make UserInfo nullable.

Bug: 144993580
Test: manual
Change-Id: I1c772564c8e9ae65699943f6a2f8c1d2c75f013b
2019-12-12 13:39:24 -08:00
Heemin Seog
ba6337f3ce Separate ShadeController from StatusBar
Bug: 144702768
Test: manual, atest SystemUITests
Change-Id: I7d72093c20b03b00cf9dce1a267a45cba1a20d7d
2019-12-11 15:56:58 -08:00