Commit Graph

366 Commits

Author SHA1 Message Date
Beverly Tai
0340a16437 Merge "Hide manage & clear affordances on transition to KG" into tm-dev 2022-04-04 18:15:24 +00:00
Beverly
b76c8250da Hide manage & clear affordances on transition to KG
We don't want to show the footer view that contains the
"Manage" and "Clear all" affordances in the notification shade
when the device is transitioning to the keyguard.

Test: manual
Fixes: 219680200
Change-Id: I1611589759e67d134ab957eee57ae865cfb64856
2022-04-01 20:21:23 +00:00
Fabian Kozynski
b4b1692357 Add better a11y support in QS
* Add ACTION_PAGE_LEFT/RIGHT to PagedTileLayout and proper focus after
  changing pages.
* Add CollectionInfo to TileLayout and CollectionItemInfo to
  QSTileViewImpl to indicate the position of the currently focused tile.
* Properly use ACTION_COLLAPSE/EXPAND in QSPanel/QuickQSPanel so the
  proper announcement is made, as well as the proper action is provided
  in the contextual menu.

Test: manual
Test: atest com.android.systemui.qs
Bug: 204726862
Change-Id: I9bb085002c99e75ab0bb91f287ded62793b932bb
2022-03-31 10:42:36 -04:00
Fabian Kozynski
d1496fc15c Merge "Fix refresh tile when tile is already listening" into tm-dev 2022-03-25 19:18:52 +00:00
Fabian Kozynski
0ca203c23c Fix refresh tile when tile is already listening
Calling refreshTile externally on a tile that is already listening can
have unexpected side effects, for example if the tile is tracking a user
interaction (e.g. turning on bt).

In particular, QSPanelController should not call it for tiles that are already
listening. This is the case for tiles that are also in QQS.

Test: manual, toggle bt ON in QQS and expand quickly.
Test: atest com.android.systemui.qs
Fixes: 225404999
Change-Id: Id0559ad95ecf6a28475abbdd8b989c745badd0b8
2022-03-24 10:44:09 -04:00
Christian Göllner
752f82ea9d [Motion] Split-shade transition on LS: add an overshoot/overscroll effect
- Applies over scroll to QS, Notifications Scrim, and NSSL instead of only NSSL
- Extracts the over scroll logic out of NSSL and into its own class adds tests

Fixes: 222034650
Test: Unit tests + Manually
Change-Id: I7e9363c3003c92bfe850b86cc9b0465b0d33cdc3
2022-03-24 10:05:42 +00:00
Matt Pietal
9fbefebbc9 Launch user switcher as SYSTEM
This switching activity should always be run as the system
user. Support specifying a UserHandle on activity transitions.

Fixes: 219638055
Test: manual, check user switching from multiple profiles
Change-Id: I4098481daeed2423ffac5023d101171e0b4cc84a
2022-03-16 18:19:33 +00:00
Nadav Bar
904975fd69 Integrate captions volume button with new CaptioningManager API
The code that checks for the captions service component will be removed
once the integration in the system captions side will happen.

Also cleans up the unused stream opt-out property.

Change-Id: I606f0d7a5319bbdc54b2e853fb70ea44ff9645a0
Bug: 221021539.
Bug: 136282740.
Test: Manually.
2022-02-23 18:04:18 +00:00
Winson Chung
352b68bfc6 Merge "Fix regression in handling of empty dark regions" 2022-02-15 04:48:24 +00:00
Winson Chung
a2078ca3d0 Fix regression in handling of empty dark regions
- Previously LightBarController calls setIconsDarkArea(null) to indicate
  to DarkIconDispatcherImpl to set mTintArea to null and dispatch
  accordingly, but DarkIconDispatcher.isInArea(<empty rect>) would return
  true, while the updated call to send an empty list would try to iterate
  the list and check isInArea() for each rect and return false otherwise.
  To mirror the old behavior, also return true by default if there is an
  empty list.

Bug: 219387839
Bug: 208717544
Test: Open an app with light bars and verify colors change
Test: atest SystemUITests


Change-Id: I265dddafb3ee7200837f8e013f92682344c080ef
2022-02-14 18:55:02 +00:00
TreeHugger Robot
4b665b9872 Merge "Modify the documentations for the UI template APIs" 2022-02-14 18:27:35 +00:00
TreeHugger Robot
444b42ef59 Merge "Remove QSDetail" 2022-02-11 14:28:00 +00:00
Fabian Kozynski
c292eff31f Remove QSDetail
Also remove related classes, calls, and resources that were used by QSDetail
and are no longer needed.

Test: atest SystemUITests
Test: TileService cts tests
Test: adb shell cmd statusbar expand-settings
Fixes: 198796184

Change-Id: Ib5c54f197d03794aca35d0305e3e62c7daedb23a
2022-02-10 16:17:00 -05:00
Cecilia
663abefa00 Modify the documentations for the UI template APIs
- Rename the classes to be less verbose;
- Add the template layout descriptions to its corresponding data
  classes;
- Documents for all getter/setter methods.

Fixes: 217554855
Test: atest CtsSmartspaceServiceTestCases
Change-Id: Id5abcea0210b19b40c96cc8183e439c8af95bf85
2022-02-10 20:24:57 +00:00
Winson Chung
6c5ebb36d8 Support multiple dark tint areas in status bar
- With ag/16678942 the system will now compute multiple appearance
  regions for all windows under the status bar, so we need to handle
  scenarios where multiple apps can create multiple dark tint areas

Bug: 208717544
Test: atest SystemUITests:LightBarControllerTest
Test: Install MultiAppeareanceRegionTest apk from b/208717544 and
      verify that that the multiple dark areas work in multiwindow
Change-Id: I0d8696f6b2fb7793ccbdcbfe7e2520fceb24e5ec
2022-02-10 17:36:47 +00:00
TreeHugger Robot
0891d4b390 Merge "Add all the Smartspace UI templates' corresponding data classes." 2022-01-28 05:43:15 +00:00
Cecilia
6927948dff Add all the Smartspace UI templates' corresponding data classes.
- SmartspaceDefaultUiTemplateData represents the data of a Smartspace
card with the default UI template;
- Other templates' data classes are all subclasses of
SmartspaceDefaultUiTemplateData;
- SmartspaceIcon and SmartspaceTapAction are the newly-added primitives.

More details in go/ss-launcher-templated-ui.

Test: tested locally
Bug:213926964,212650337
CTS-Coverage-Bug:214471292

Change-Id: I056c49e3db7060697be4a3a8f51358802f2610b0
2022-01-27 21:00:47 +00:00
Josh Tsuji
32354d952b Adds Launcher in-window animations, and reworks how the unlock flow works.
Bug: 197636887
Test: atest SystemUITests
Change-Id: If6ff114f90fcfc19b9e3530bb0dea8cc0591f745
2022-01-18 17:41:28 -05:00
Fedor Kudasov
0a7934c3f9 Annotate com.android.systemui.qs with @Nullable
Bug: 209459024
Test: m SystemUI-core
Change-Id: I48ba7039ca826c8304f425f34a8c84981710dc77
2022-01-07 13:51:16 +00:00
TreeHugger Robot
ffe4331a9b Merge "Deprecate unused methods in QSTileImpl" 2022-01-05 20:49:56 +00:00
Fabian Kozynski
a74a7c079e Fix QS expansion animations
* Fix gap between tiles when expanding
* Fix second page collapsing animation: tiles now will shrink and at the
end be replaced by QQS tiles. We need to create the animators as we move
through the pages, as PagedTileLayout only has the current page and the
(up to) two adjacent ones. This means that if the page has not been
added, we don't have correct positions and measures.

See bug for video
Fixes: 207895040
Test: manual

Change-Id: Id2b14b11ace4199ed07f7675b6575cb4b71e93d5
2022-01-04 10:04:07 -05:00
Fabian Kozynski
7f8742dbf6 Deprecate unused methods in QSTileImpl
* Deprecate getMetricsCategory, as UiEvents just use a string for each
tile.
* Remove all a11y announcements methods. These were not used, as we've
been using stateDescription

Test: atest SystemUITests
Bug: no bug

Change-Id: Id7a53abe59bc2b265f3049e844d9e8d9c4ef1f83
2021-12-29 10:40:12 -05:00
Automerger Merge Worker
4ad1a3d750 Merge "Merge "Prevent bad intents from crashing sysui" into sc-v2-dev am: 08d6bcbd19" into sc-v2-dev-plus-aosp am: 4413f9d635
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16493100

Change-Id: Ib805bf25905b75ab2646b14221cb57c4db980857
2021-12-16 22:54:12 +00:00
Matt Pietal
51f8e62e54 Prevent bad intents from crashing sysui
Smartspace could potentially send Intents that don't resolve, which
will crash sysui. Log a warning. Also register an event notifier to
let the SmartspaceSession know of a user action.

Bug: 208350043
Test: atest LockscreenSmartspaceControllerTest + manual (use new
smartspace flashlight off content)

Change-Id: Ife517864c6933bc2d6ef01c28ec97363d9ebfbd7
2021-12-16 20:21:56 +00:00
Jamie Garside
50701a0bd3 Merge "Fix bugs with QS customizer when split shade is active." into sc-v2-dev am: 1351c6f6d6 am: 8aafc9d814
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16123522

Change-Id: I1c95ea4ef645b595f3a7da2bdd5e2291a97dbf2f
2021-11-16 16:50:56 +00:00
Jamie Garside
eb7a55cc47 Fix bugs with QS customizer when split shade is active.
* When the QS customizer is active, closing the split shade does not
close the customizer.
* When three-button nav is enabled, pressing back when the QS customizer
is active on the split shade will close the shade, not close the
customizer.

This CL instead adds functions to QS.java so we can check whether the
customizer is active (and close it), so we can handle these cases
appropriately.

Test: Manually verified.
Bug: 201388768
Change-Id: I94208d1cd966975f39328529b9d866fbf27927ac
2021-11-15 11:09:17 +00:00
Jeff DeCew
45ab1bafb6 Fixes for SysUi-Studio gradle build
* Gralde now fails if AndroidManifest.xml uses the <uses-sdk> tag.

Test: gradle build
Change-Id: I759431dfe01c73a351419d97c9575c74d7dcdd8d
2021-11-08 19:17:38 +00:00
Dave Mankoff
b0505162ca Revert "Revert "Merge "Add a shared library for setting flags in SysUI." into sc-v2-dev am: fdb01b6353 am: abef1d3d2b""
This reverts commit 4977c9aaec.

Reason for revert: Fixing this revert.

Change-Id: I65ada48df4b3a581a59115d4303c99ed6931b8b7
2021-11-04 06:01:54 +00:00
Dave Mankoff
4977c9aaec Revert "Merge "Add a shared library for setting flags in SysUI." into sc-v2-dev am: fdb01b6353 am: abef1d3d2b"
This reverts commit 31d5370b038e32894843c299350d2ecb15a4b55f.

Reason for revert: Bad merge

Change-Id: Ib721f4e00a1a78477c3f9af511a9abd89331f9f8
2021-11-04 05:00:11 +00:00
Dave Mankoff
6f7a0d6743 Merge "Add a shared library for setting flags in SysUI." into sc-v2-dev am: fdb01b6353 am: abef1d3d2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16092692

Change-Id: I2debaf6ed83b2cbf72bbb1b578c8b30a8a58a4da
2021-11-04 04:48:37 +00:00
Dave Mankoff
93c9d9d665 Add a shared library for setting flags in SysUI.
This adds the FlagManager class which currently has 3 methods:
- #getFlagsFuture
- #setFlagValue
- #eraseFlag

The first makes an async call to SystemUI to retrieve the flags
it knows about. It returns a collection of Flag objects from which
one can get the id, type, and default values.

The other two are fairly self-explanatory, sending intents to
SystemUI telling to set or erase flags. Any app calling these
methods must have the FLAGS_PERMISSION defined in the FlagManager
library.

Only boolean flags are supported at the moment.

Bug: 203548827
Test: manual
Change-Id: Id15ff481edcb83c67ce4cdad6cdda27d28a40652
2021-11-02 11:27:55 -04:00
Jeff DeCew
53f489d7b0 Remove dismiss-rtl setters because dismiss is bidirectional
Fixes: 204127880
Test: dismiss notifs; change RTL; dismiss more
Merged-In: Ia3e0c80a1bfb81f039c6409718d5fbeced455939
Change-Id: Ia3e0c80a1bfb81f039c6409718d5fbeced455939
2021-10-29 16:10:50 -04:00
TreeHugger Robot
0471b20b1b Merge "Smartspace - Allow clicks to avoid intent launch" into sc-v2-dev am: 4d7afd976a am: f20d18728e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16102665

Change-Id: I1e1a31d946648cd346ae9ccbd4f33f77c625ef27
2021-10-27 20:02:45 +00:00
TreeHugger Robot
4d7afd976a Merge "Smartspace - Allow clicks to avoid intent launch" into sc-v2-dev 2021-10-27 18:58:22 +00:00
Lucas Dupin
423de56de4 Merge "Make QS buttons squishy" into sc-v2-dev am: b19768ef82 am: 6a256fc113
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16058353

Change-Id: Idb5f7050f4cf0d726d995020c94319697fae8452
2021-10-27 16:49:01 +00:00
Matt Pietal
1e85995059 Smartspace - Allow clicks to avoid intent launch
When 'show_on_lockscreen' == true in the SmartspaceAction extras,
start the activity without requiring the device to be unlocked.

Fixes: 203775218
Test: manual
Change-Id: Iab5505fc7aec8d7e29364ff7d3d527f5d71ec5b3
2021-10-27 09:39:07 -04:00
Lucas Dupin
037c2cdc7e Make QS buttons squishy
Pass squishiness fraction from notifications to QS, and make it behave
accordingly.

Test: manual
Test: atest QSSquishinessControllerTest
Bug: 199047412
Change-Id: I9f5df7ae99e0bced4626dcb36053c9dba78ec672
2021-10-26 14:50:29 -07:00
Dave Mankoff
83b4d8b29b Convert existing flags to new system.
This is for the "easy" flags. Flags which are defined in one place
in our resources and and require no extra work to convert to the
new architecture.

Bug: 202860494
Test: manual && atest SystemUITests
Change-Id: Id03fe61b6697bf98fdd225ba252de58e07c42496
Merged-In: Id03fe61b6697bf98fdd225ba252de58e07c42496
2021-10-15 11:38:18 -04:00
Dave Mankoff
0026b204a9 Convert existing flags to new system.
This is for the "easy" flags. Flags which are defined in one place
in our resources and and require no extra work to convert to the
new architecture.

Bug: 202860494
Test: manual && atest SystemUITests
Change-Id: Id03fe61b6697bf98fdd225ba252de58e07c42496
2021-10-15 11:36:04 -04:00
TreeHugger Robot
c511b9a64e Merge "Add ability to set/erase flags via intents." into sc-v2-dev am: 155b0fe36a am: 9d3f6d809f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16049898

Change-Id: I60c9c5b60d3c9f1cefccfa0221a3acbc989acc20
2021-10-15 15:10:39 +00:00
Dave Mankoff
13be650880 Merge "Add ability to read and write flags to sysprops." into sc-v2-dev am: 349012b8ce am: 3e0a5f949f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16049897

Change-Id: Ie58e622d72bacd5632786f9b5a84faf416746900
2021-10-15 09:45:46 +00:00
Dave Mankoff
f6db05e59f Add ability to set/erase flags via intents.
A flag can be set with a command like the following:
adb shell am broadcast -a com.android.systemui.action.SET_FLAG \
--ei id 1 --ez value 1

A flag can be "erased" with the same command, but leaving the value
unset.

Bug: 202860494
Test: manual
Change-Id: If1097e230692df49a6de7cbbb71ed37b0499c663
2021-10-14 17:39:09 -04:00
Dave Mankoff
898026515a Add ability to read and write flags to sysprops.
Bug: 202860494
Test: manual
Change-Id: I660931492e8a2ffd1373162aab60e4abd4566db6
2021-10-14 12:24:45 -04:00
Jay Aliomer
5eac15cf85 Remove flag plugin with flag manager with DI
Test: FeatureFlagsTest
Bug: 196602427
Change-Id: I43961a091f0f10ebd1a168f40703f0067d9f8a18
Merged-In: I43961a091f0f10ebd1a168f40703f0067d9f8a18
2021-10-14 12:24:45 -04:00
TreeHugger Robot
59d7598b52 Merge "Animate QS alpha on split shade pull down" into sc-v2-dev 2021-10-12 01:06:09 +00:00
Lucas Dupin
1ec71012d1 Animate QS alpha on split shade pull down
When pulling down the shade in split mode, the quick settings alpha
should be directly connected to the drag down gesture and the same that
we have for the notification shade.

Test: manual
Bug: 200804740
Fixes: 196722669
Change-Id: I6532c8a78826a5b60609dc66557abc49a3f140c5
Merged-In: I6532c8a78826a5b60609dc66557abc49a3f140c5
2021-10-12 00:08:39 +00:00
Lucas Dupin
f38e4ae60b Animate QS alpha on split shade pull down
When pulling down the shade in split mode, the quick settings alpha
should be directly connected to the drag down gesture and the same that
we have for the notification shade.

Test: manual
Bug: 200804740
Fixes: 196722669
Change-Id: I6532c8a78826a5b60609dc66557abc49a3f140c5
2021-10-11 19:51:54 +00:00
Caitlin Cassidy
8e5a3bc09d Merge "[Ongoing Call] Show semi-transparent background behind status bar in immersive mode." into sc-v2-dev am: a9129a5f9d am: df876ad5bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15785552

Change-Id: I677b6b54e58e0c219ef9442711a05489fc3ffbb1
2021-10-08 16:06:16 +00:00
Caitlin Cassidy
a9129a5f9d Merge "[Ongoing Call] Show semi-transparent background behind status bar in immersive mode." into sc-v2-dev 2021-10-08 15:54:13 +00:00
Michał Brzeziński
9f2335ea1d Merge "Fixing bottom part of QS not getting any touches in split shade" into sc-v2-dev am: 3b59f276f5 am: 2eaa8c0761
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15897423

Change-Id: I01d051bb5a8f4b39ee7a22e6e8bebc9bdc25a1c7
2021-10-07 01:31:12 +00:00