Commit Graph

982 Commits

Author SHA1 Message Date
TreeHugger Robot
2dba59c0b6 Merge "Merge emulated cutout into either rounded corner overlay" 2018-01-31 14:56:27 +00:00
TreeHugger Robot
957fe1e791 Merge "Split HeadsUpManager implementation to HeadsUpManagerPhone" 2018-01-31 06:00:32 +00:00
Julia Reynolds
9f2222f6ea Merge "Add content description to volume button" 2018-01-30 20:13:12 +00:00
TreeHugger Robot
d32110ed32 Merge "Use the correct prebuilts for lifecycles." 2018-01-30 18:50:45 +00:00
Julia Reynolds
561d3f4d09 Add content description to volume button
Change-Id: I910139816a5d57acc72cf803d421b00c21564e38
Fixes: 72458451
Test: runtest systemui
2018-01-30 17:52:21 +00:00
TreeHugger Robot
3924c91747 Merge "Test is causing others to break in specific cases" 2018-01-30 17:50:20 +00:00
Adrian Roos
5b51885427 Merge emulated cutout into either rounded corner overlay
This so that we can save a layer, which avoids dropping us into
GL composition during animations.

This assumes that the cutout is always at the top or bottom edge
in the device's natural orientation.

Note that the two overlays for the top and bottom rounded corners
are still separate.

Bug: 72492508
Test: enable emulated cutout, verify it still shows up
Change-Id: I895084828e0502005bfa31e37d23dd3a6f01a2ca
2018-01-30 15:18:01 +01:00
yoshiki iguchi
78db3d0b0f Split HeadsUpManager implementation to HeadsUpManagerPhone
This CL splits HeadsUpManager with the basic functionality and the
phone (and car) related implementation. The former code leaves in
HeadsUpManager class, and the later code is moved to separated
HeadsUpManagerPhone class.

This contains the following minor changes:
- Move the utility static methods to HeadsUpUtil class.
- Chanege the return types of HeadsUpManager#getAllEntries() and
  HeadsUpManager#getTopEntry() from Collection<HeadsUpEntry> to
  Stream<NotificationData.Entry>.
- Add a private method: HeadsUpManagerPhone#getTopHeadsUpEntry()
- Make the mPluse propertes boolean instead of Collection in
  AmbientState and NotificationStackScrollLayout classes.
- Unify removeAllHeadsUpEntries() and releaseAllImmediately(), since
  they do same thing.
- Move getTopHeadsUpPinnedHeight method from HeadsUpManager to
  NotificationStackScrollLayout class, since only this class uses it.
- Add a simple test.

Bug: 63874929
Bug: 62602530
Test: Compile and ran "runtest systemui"
Change-Id: I3e5160803b9cdf1a164339557528ace0d35f8187
2018-01-30 17:56:49 +09:00
Alison Cichowlas
76f0ccb5f1 Revert "Security model for moving sharesheet to systemui"
This reverts commit 88f3d4dbe1.

Bug: 72554856
Test: repro instructions in bug
2018-01-29 16:34:33 -05:00
Beverly
0ba10e0544 Test is causing others to break in specific cases
- ZenModePanel is not currently being used (changed to
EnableZenModeDialog.java), so ignore test

Test: runtest systemui (ZenmodePanelTest don't run)
Bug: 72636697
Change-Id: I7bcb628e303c55bc4764c61c82a75b5ebdeeeade
2018-01-29 10:44:21 -05:00
Aurimas Liutikas
a43e216e3e Use the correct prebuilts for lifecycles.
This change should have no effect on the app. It is simply unifying some of the prebuilts.

Bug: 72566647
Change-Id: Ic748f8f425e8c8e44bacf62ea61b9af307774911
2018-01-26 23:20:09 +00:00
TreeHugger Robot
61ec9aeba7 Merge "Fixed the launch animation with flag auto cancel" 2018-01-26 01:16:31 +00:00
Selim Cinek
7e222c3c15 Fixed the launch animation with flag auto cancel
Previously the cancelling wasn't delayed until the
panel collapsed, leading to bad transitions and
animations. Also fixed double clicks better.

Change-Id: I2523e226b60b3d5744a920582cb99f5ca8042fdc
Fixes: 69168591
Test: add notification with auto cancel, click on it
2018-01-25 23:31:29 +00:00
Jason Monk
c1b96ee4b4 Make tests less flaky?
Test: runtest systemui
Change-Id: Ib70eed931d3e927b0d80d694b1751942c1b64c56
2018-01-25 15:48:06 -05:00
TreeHugger Robot
f8fc7235d4 Merge "Display proper block text for blocking helper" 2018-01-25 17:02:24 +00:00
TreeHugger Robot
3512edbc78 Merge "Remove dependency from RemoteInputController to StatusBarWindowManager." 2018-01-25 11:58:26 +00:00
TreeHugger Robot
07c15cb88a Merge "Add flag to SysUI for Hybrid notification" 2018-01-25 01:49:22 +00:00
Julia Reynolds
0ef7d842b9 Display proper block text for blocking helper
Test: runtest systemui
Bug: 63095540
Change-Id: Ifa86744e2ddbb0170f61d15750a2e5453107988d
2018-01-25 01:02:18 +00:00
Salvador Martinez
bb902fcda4 Add flag to SysUI for Hybrid notification
This CL adds some configurable flags to the logic for showing the
hybrid notification.

Test: Tests still pass
Bug: 72122935
Change-Id: I8b13346167a79691ecc3cb21e45b42f8ae99e7b8
2018-01-24 11:24:19 -08:00
Geoffrey Pitsch
d997d191ed Merge "Security model for moving sharesheet to systemui" 2018-01-24 17:33:59 +00:00
Julia Reynolds
f5e4182d2f Output chooser layout updates
- Anchor output chooser to volume buttons
- Dismiss output chooser if volume dialog becomes visible

Test: manual, runtest systemui
Fixes: 72319160
Bug: 63096355
Change-Id: Ibca7576f287655fb5c98554e67781ec53152ddef
2018-01-24 15:22:25 +00:00
Petr Cermak
9a3380c08c Set "results source" on RemoteInput intents sent from System UI
If the input comes from RemoteInputView (the user manually typed an
inline reply), the source is set to RemoteInput.SOURCE_FREE_FORM_INPUT.
If the input comes from SmartReplyView (the user tapped on a smart reply
button), the source is set to RemoteInput.SOURCE_CHOICE.

Bug: 67765414
Test: atest RemoteInputViewTest SmartReplyViewTest
Change-Id: Icff46b903a968bd8457624b358d626b457569352
2018-01-24 11:54:00 +00:00
TreeHugger Robot
098b1b58b3 Merge "[QS] Add secondary label to Hotspot tile" 2018-01-24 03:42:30 +00:00
Rohan Shah
e4071127a6 [QS] Add secondary label to Hotspot tile
Added info to callback and leveraged WifiManager API to get the number
of connected devices. There's some minor state cleanup done and the
fire callback mechanism was slightly updated.

The secondary label is updated based on the connected devices & enabled
state.

Screenshot: https://screenshot.googleplex.com/jHMKmg2nO08

Test: manual
Bug:68058038
Change-Id: Iafcebd3476d2c13e25939b45e78f32a5bd24cb68
2018-01-23 15:49:45 -08:00
Alison Cichowlas
08abf6df97 Force screenshots to heads-up priority.
Test: updated ChannelsTest; manually verified heads up ss posted and old channel deleted.

Change-Id: Iafc1c65d3e8a5929ba922a2814848ce5bc036747
2018-01-23 12:55:50 -05:00
Geoffrey Pitsch
88f3d4dbe1 Security model for moving sharesheet to systemui
ResolverActivity (still in frameworks) now requests a "permission token"
that it hands to a stubbed system ui activity ChooserActivity.

This permission token allows an app (SysUI) with the signed permission
"START_ACTIVITY_AS_CALLER" to call
ActivityManagerService#startActivityAsCaller. Permission tokens are a
one-time use, limited-time offer.

Test: runtest systemui && manual testing
Bug: 69850752
Change-Id: I3600e1a8ff9eea7397f5f59853423c79b6401f98
2018-01-23 10:23:55 -05:00
TreeHugger Robot
80336a8a31 Merge "Initial support for camera cutout in CollapsedStatusBar" 2018-01-22 16:39:25 +00:00
TreeHugger Robot
706012918f Merge "Add tests for NotificationGutsManager" 2018-01-21 19:35:21 +00:00
TreeHugger Robot
7a3efdb9c6 Merge "Update output chooser for calls" 2018-01-21 19:30:26 +00:00
Julia Reynolds
5daa47270b Update output chooser for calls
- Hide media routes while in call
- Change the title while in call
- Add a title while not in call, too

Bug: 63096355
Test: manual
Change-Id: Ib7bcd314efb010fe903327dd4d9bdbfe521c1f73
2018-01-20 15:29:41 +00:00
yoshiki iguchi
a85c2a0032 Add tests for NotificationGutsManager
This CL adds two tests for NotificationGutsManager:
- opening and closing guts
- Reinflate and replace guts by changing density (or font scale)

Bug: None
Test: Compiled and ran "runtest systemui"

Change-Id: Ic51fa97d18ec78a2c74dd16d01440a2e0f9991ef
2018-01-19 19:30:11 +09:00
Winson Chung
dff7a73979 Fix Recents regressions
- Remove extra argument from the invocation of Recents from AM/WM, fetching
  the states directly. This also fixes the issue with the docked task from
  showing in Recents since the state will trigger the preloaded task stack
  to be invalidated.
- Move Recents stack update to onStart() to ensure that it is updated with
  the changes introduced in ag/3338461
- Fix an issue with the initial state being clobbered when entering split
  screen

Bug: 70279132
Test: Long press recents button to split screen, verify task is not visible
Change-Id: If5a3ca1d86fa0025d6b1e08abf73fe80a390ef8e
2018-01-19 03:44:05 +00:00
Evan Laird
058c8aee39 Initial support for camera cutout in CollapsedStatusBar
- Display a space view exactly covering where the display cutout is

- Custom layout for system_icons because this view needs to now layout
right-to-left, and hide icons that don't fit. Similar to notification
icon container but in the other direction. Still needs dots and to limit
the # of icons

- When in landscape/seascape, the cutout space disappears and instead
the status bar insets itself by the same amount that the window is
letterboxed

- Moved battery percent back to the right of the battery because the
time is no longer on that side

Test: adb shell cmd overlay enable
com.android.internal.display.cutout.emulation && adb shell stop && adb
shell start # to start emulation
Bug: 63772836

Change-Id: I8071bfb4983a9d9306df1487cdac956494e80c28
2018-01-18 09:20:13 -05:00
TreeHugger Robot
52c3685613 Merge "Temporary affordance for blocking helper" 2018-01-17 17:22:31 +00:00
Salvador Martinez
6644e252cd Merge "Refactor code to support overridden low battery warning" 2018-01-16 16:29:33 +00:00
Eliot Courtney
012fae99b3 Remove dependency from RemoteInputController to StatusBarWindowManager.
Removes the direct dependecy from RemoteInputController to
StatusBarWindowManager and adds a test testing that notification
management code doesn't depend upon StatusBarWindowManager.

Bug: 63874929
Bug: 62602530
Test: runtest systemui
Test: Compile and run
Change-Id: I9cf63a7069cd6c4b7bd05db881c3029fe5bb1fad
2018-01-15 13:53:26 +09:00
Dan Sandler
1d958f8c35 Temporary affordance for blocking helper
When a notification is flagged by NoMan as USER_SENTIMENT_NEGATIVE (odd,
since this is actually the system's sentiment), a small  icon will
appear that directs you to the notification settings.

Eventually the icon will be removed, and the settings (reworded to
explain that you seem not to like this kind of notification) will be
left behind in the shade.

Bug: 63095540
Test: runtest systemui
Change-Id: I8b815cd035e9730bbbf1d4a1be17db9d494111ed
2018-01-13 15:34:57 +00:00
Jason Monk
459fee3b0f Follow some slice refactors
Test: make
Bug: 68378561
Change-Id: Ifcf2b426f4984d8dda257b55e59d6da7e8d38237
2018-01-12 09:22:38 -05:00
Salvador Martinez
f9e4750af7 Refactor code to support overridden low battery warning
This adds support for enabling the hybrid notification using data
from Device Health Services.

Test: SystemUITests
Bug: 27567513
Change-Id: I5fae3d85f2d4956210bb067ff7c8b14146c8c89c
2018-01-11 09:14:56 -08:00
TreeHugger Robot
1b3adf9470 Merge "Inline noti blocking is now in the form of a question" 2018-01-10 23:49:14 +00:00
Julia Reynolds
437cdb1464 Inline noti blocking is now in the form of a question
And has an 'undo' flow that matches snoozing.

Test: runtest systemui
Bug: 63927402
Change-Id: Idc17b8d950bc3da7ec9fe035dc8a65146d12c456
2018-01-10 12:56:57 -05:00
Michael Plass
4422221bd0 Merge "Deprecate WifiManager EXTRA_BSSID, EXTRA_WIFI_INFO" 2018-01-10 16:23:49 +00:00
Lucas Dupin
4df92c366e Update clock whenever AoD unpauses
Clock might show wrong time otherwise.

Test: cover prox sensor, look at clock
Change-Id: I73e37f133e877ef0affa038f23b0e11787f9aa65
Fixes: 65674396
2018-01-08 20:42:10 -08:00
TreeHugger Robot
feeb12a962 Merge "Let wallpaper know when to animate AoD transition" 2018-01-05 00:32:25 +00:00
Søren Gjesse
5ec9db0e8d Merge "Refactor leak tests" 2018-01-04 07:12:14 +00:00
Søren Gjesse
0fded55c45 Refactor leak tests
Change the code to not rely on debug mode compilation for D8/R8.

For R8 -dontoptimize is still required (default for tests) to avoid
inlining that could "revert" this change at compile time.

Test: m -j USE_R8=true SystemUITests
Test: Run tests and see failures from b/70879514 are gone

Bug: 70879514
Change-Id: Ic8bb2bd3a91da0ecb2ec4e40183f47e4daf6323c
2018-01-03 15:24:55 +01:00
Lucas Dupin
6bd8601e9f New keyguard slice data structure
Using androidx package and new API, also splitting content into
multiple views for better animation support.

Bug: 64155983
Test: visual, see data from provider propagate to AoD
Change-Id: I74b5511d582e7ec1f6ffe5dbc5595f54b9ccb202
2018-01-02 14:19:24 -08:00
Eliot Courtney
6c313d3224 Initialise Notification*Manager dependencies directly.
Currently, adding a new dependency to any of these classes means
updating the constructors of any subclasses, and the construction in the
corresponding SystemUIFactory classes and subclasses. In particular,
updating these in separate vendor/ projects is annoying. So, initialise
the dependencies using field initialisers. The downside is that it's
harder to notice circular Dependencys.

Bug: 63874929
Bug: 62602530
Test: runtest systemui
Test: Compile and run
Change-Id: I21d58d0cc0edeb6d53fb7b387c9baeec7bd80589
2017-12-26 17:22:15 +09:00
Eliot Courtney
4a96b36fd9 Remove NotificationPresenter#getEntryManager.
Instead, pass it along with calls to setUpWithPresenter.

Bug: 63874929
Bug: 62602530
Test: runtest systemui
Test: Compile and run
Change-Id: Icd60cf671b12b33d4565cc608c6141cd580c790e
2017-12-26 17:09:25 +09:00
Eliot Courtney
8f56b0e345 Change all mocks that are Dependencys to be properly injected.
If a class being unit tested is changed to Dependency.get() a dependency
rather than receiving it as an argument, the tests could break in subtle
ways. Make sure all mocked Dependencys are properly injected as test
dependencies.

Bug: 63874929
Bug: 62602530
Test: runtest systemui
Change-Id: I2b23a2ea0ac9067952624a5c302ca419685307ae
2017-12-26 16:57:15 +09:00