92 Commits

Author SHA1 Message Date
Fabian Kozynski
fd388805d6 Calculate min height for header in code
Having a resource that depended on 6 other resources was becoming
unmaintainable. Replace with in code calculation, guaranteeing that
it'll always be up to date for handheld devices.

Test: manual
Fixes: 225405922
Change-Id: Ieb13b1d71d4b205ea37ff096e447f93bbaec2630
2022-03-24 14:50:30 -04:00
Winson Chung
edb03dc840 Fix issue with wrong style being used in landscape
- Legacy style was overriding the Shell landscape style for the
  divider

Bug: 213379024
Test: Build sysui from studio and verify the divider background
      is correct
Change-Id: Ic47b411fad0469c86459cc01189a722dbad8d8c3
2022-03-10 18:28:35 +00:00
Fabian Kozynski
c10360869d Change tile height to 80dp
Change from 84dp to 80dp. Also, remove unnecessary overlay in landscape.

Test: manual, also tested changing configurations
Fixes: 221079711
Change-Id: Ifdf3fc2bde28ab0fc8666de855de3a1f968a02a8
2022-02-23 13:52:18 -05:00
Alex Florescu
79718744d4 Merge "Configure power menu grid" 2022-02-11 15:58:40 +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
Alex Florescu
8f24d1b617 Configure power menu grid
Fixes: 216769732
Test: manual
Change-Id: I6c6df7032a9ef08ba6886021534eca255ed31edd
2022-02-10 16:05:13 +00:00
TreeHugger Robot
a38e938b6f Merge "Fix SysUI dialog width" 2022-01-31 11:04:51 +00:00
Jordan Demeulenaere
a87880f1eb Fix SysUI dialog width
This CL fixes the code that sets the dialog width such that:
 1. Dialogs don't match their parent width on phones in landscape.
 2. We take the background insets into consideration, so that the
    actual dialog size is exactly what we want it to be.

Before this CL, we wouldn't take the background insets into
consideration and therefore a 504dp width dialog was actually
504dp - 2 x 16dp = 472dp.

Bug: 203389579
Test: Manual
Change-Id: Ic66b043fe57ea7d493831e2b7d0e42a62362fd6f
2022-01-28 16:51:56 +01:00
Aaron Liu
2443194dd3 Home Controls: Adjust resource configs for UI to be responsive.
Adjusted resource configs to be responsive for the tablet.
We expect to see 3 columns for portrait and 4 columns for
landscape on the tablet. We still need to adjust margin, which
will be done in a later CL.

Bug: 215745329
Test: Manual test on CF tablet instance.

Change-Id: Ib21be2badffdc92b357d25f710b5a8c757e3dd08
2022-01-27 17:02:45 +00:00
Tony Huang
70b7b1e2d8 Fix divider rounded corner on specific devices
On large rounded corner devices, Rounded corners around divider
cannot display right corner path because it need more space to
draw corners and divider bounds is fixed.

Fix this by enlarging the divider window bounds. However, if we only
enlarge it, it will cause divider touch region too big to make app
hard to interactive. Therefore, migrate touch region setting logic
in legacy split to here, only set divider handle view size as touch
region.

Fix: 202808282
Test: flash on barbet and active split screen to check
Test: pass existing tests
Change-Id: If292c0d4c598d75672ec821d1fee45a8892b236f
2021-10-28 09:01:37 +08:00
Alex Florescu
50018ac73a Use different top margin for the QS detail panel in split shade
qs_detail_margin_top was already used, renamed it to be more specific

Bug: 196805101
Test: manual
Change-Id: I88522bc0a3b8b11c648e299ca33bf118b644032f
2021-08-18 09:31:21 +00:00
Jeff DeCew
43603d9839 Remove notification cap on lockscreen
Fixes: 190630151
Change-Id: Ieb29b046fc867e9bf26aafafb942dafebb1976c2
2021-08-13 15:44:45 +00:00
Thales Lima
fc546a96c4 sysui: show security footer on the bottom when in split shade mode
When showing the notification shade in split mode, the security footer
should always be shown after the footer. This also updates resources to
have a best usage of configs and dimensions.

Fixes: 188906516
Test: Added tests to QSPanelTest
Change-Id: Iea29490aa73bc4fb3fe3cce82e181a22adca2937
2021-07-16 11:48:32 +01:00
Silin Huang
b54f210c44 Polish the wallet screen landscape mode.
Test: manual
Bug: 188471339
Change-Id: Ic6fef8d7bd19bc76cff9f0e040b9e8fb87837a98
2021-06-30 18:03:18 +00:00
Fabian Kozynski
67d664e278 Fix position of QSSecurityFooter
Make sure that it's always before media in portrait.

Also, enforce a single line in landscape, as well as size constraints.

Test: manual
Fixes: 189300305
Change-Id: Iddb1da80bf4169d255212f3839c405d901b636d4
2021-06-04 12:59:57 -04:00
Josh Tsuji
995553c359 Fix the live caption tooltip, which was sad and broken.
- Position it correctly using getLocationOnScreen since the dialog height is now variable.
- Update colors so it's readable in dark mode.
- Make it touchable so it can be dismissed without dismissing the entire volume dialog.

Fixes: 184624161
Test: commented out setting tooltip seen so I could experiment with it
Change-Id: I44ba0f9a5488edf88a63ff4842e9abc27e1ce408
2021-05-26 12:16:10 -04:00
Josh Tsuji
826a48e02a Update landscape volume design to match the new portrait design.
This mostly just copies over the XML with minor changes for landscape, and modifies the background drawable code to compensate for the horizontally opening ringer drawer.

Bug: 187200513
Test: adjust volume in landscape
Change-Id: I933b5a74f4a52d2a195829d54f1983305e4036b5
2021-05-24 11:40:18 -04:00
Fabian Kozynski
79cfa8925b Fix margins between headers and tiles.
Also:
* Remove old classes.
* Change height of tiles.
* Add back clipping on PagedTileLayout, as the views don't need to go
outside its bounds.
* Fix a scrolling issue

Fixes: 187460996
Fixes: 187966021
Fixes: 187334034
Fixes: 188459321
Test: manual
Change-Id: Ide520f26982a3f2c8918424cb4c14d3d14da3724
2021-05-19 15:53:54 +00:00
Fabian Kozynski
8ed244eaec Remove divider between QSFooter and media
Also, set gap between QSFooterView (or QSSecurityFooter) and media to
8dp.

Fixes: 187316973
Test: manual
Change-Id: Ie0ab67ac298951f749025d6699d302c27b0e6a80
2021-05-05 16:03:41 -04:00
Fabian Kozynski
034526003a New SecurityFooter design
Changes:
* Footer appears below QSFooter in portrait, QSBH in landscape
* In portrait, height is 48dp for one line of text, 88dp for two lines
of text.

Creates a new layout that inherits from LinearLayout (horizontal) and
adjusts its height based on the number of lines of the containing text.

Test: manual
Test: atest QSSecurityFooterTest
Fixes: 186033456

Change-Id: Ia4f9d5c9b4078d790f654dbd4b82d14670985f8d
2021-04-27 10:06:32 -04:00
Fabian Kozynski
e03e4c9e84 Add some padding between QS and shelf
Also fix margins of QSDetail

Test: manual, with and without media
Bug: 185390072
Change-Id: Ia4367e933319a55c2f62d4ec8b9d6b4532977816
2021-04-19 15:33:40 -04:00
Fabian Kozynski
cd41fcd0de Fold in QS overlay resources and set flag to true
This also consolidates some resources that were size dependent if they
are not needed.

Bug: 185250134
Test: manual
Change-Id: I98002a1b1f29d0bd68af1c6b76f5e4fb21cdb421
2021-04-13 15:31:19 -04:00
Beverly
b89e62ee51 Toast design polish
Update toast layout for both SystemUI and in framework to match. The
main difference is the framework layout does not have an icon.

Test: manually with and without SystemUiGXOverlay
Fixes: 169587378
Change-Id: I3cd89390325551d3f5b780878f8cc820f92ea1b9
2021-02-18 08:24:00 -05:00
Beverly
75a4033db8 Update Toast visuals + motion
Puts Toast style/animation changes behind a FeatureFlag

Toasts can be added via Toast APIs OR legacy apps can add the
window directly. Because toast windows can be added directly by legacy
apps, DisplayPolicy.java requires that toast windows are removed
after TOAST_WINDOW_TIMEOUT.  This also means Toast windows added via
the Toast APIs are subject to this timeout. Therefore, this CL also
increases the timeout by 600ms to account for SystemUI's in/out
toast animations.

Bug: 169587378
Test: atest ToastUITest
Test: manual, rotate device while toast is showing
Change-Id: Ib17655c253f4ec4f7018cc5f7939b88a50ea5014
Merged-In: Ib17655c253f4ec4f7018cc5f7939b88a50ea5014
2021-02-10 17:08:51 +00:00
Fabian Kozynski
032d1b1df3 Use 4 columns in QS portrait
This changes the default number of columns in QS and QQS portrait to 4.
This means 4 tiles in QQS and 4/8 tiles in QS.

Test: manual

Change-Id: Idf017e3b7e8bd4b790e2f6fdbb4c568c4487b974
2020-11-12 09:14:16 -05:00
Fabian Kozynski
c45d61cfdf Refactor ToggleSliderView
ToggleSliderView logic is refactored into a separate controller. A
factory that creates the controller inflates the correct view so the
behavior is transparent to consumers.

The new prototype for brightness slider is here.

Allows to switch between regular brightness slider and thick one:

`adb shell settings put secure sysui_thick_brightness X`

where X is one of:
0 - regular brightness slider
1 - thick brightness slider with mirror
2 - thick brightness slider without mirror

After changing restart device or sysui:
`adb shell am crash com.android.systemui`

Test: manual
Test: atest SystemUITest
Change-Id: Ica7b31d6880c3be831d3f99115945b330ba3d618
2020-11-10 16:41:00 -05:00
Tony Huang
eb01a25c87 Migrate Bubbles to wm-shell (5/n)
Move bubbles package and related resources to shell package,
also copied some used codes and resources.

Bug: 161980186
Test: atest SystemUITests
Test: atest WMShellUnitTests
Change-Id: Ia108bd4149b3c3bf86631ba1a7a6bce0e76af78f
2020-11-04 11:01:56 +08:00
Fabian Kozynski
a3a7c45f36 Reduce vertical margins in landscape add controls
This makes it so we can have at least one entire control tile visible
when scrolling.

Test: manual
Bug: 166166119
Change-Id: I7514cf8af69b4ba1d6c0bf76cdc21cd3c0719bd2
2020-08-28 10:26:09 -04:00
Matt Pietal
250a34cee3 Global Actions - Power menu too tall in landscape
Set a different height for landscape to fit in all devices

Fixes: 159906363
Test: manual, set largest display/font
Change-Id: Ie4ab49fca4691ff377af0f5df329c6b97343d604
2020-06-26 11:22:10 -04:00
Curtis Belmonte
7100caa75e Let biometric prompt button text wrap to new line
Fixes an issue where the buttons on the biometric prompt would fail to
wrap to a second line in order to accommodate long label text. This
caused the buttons to be truncated in some languages (e.g. Russian).

Test: On a Pixel 4 XL:
1. Ensure a lock pattern is set and Face Unlock is enabled
2. Set the system language to Russian (Russia)
3. Open wifi settings and select a saved network
4. Tap on the "Share" button for this network
5. Wait for Face Unlock to time out for the prompt
6. Rotate the device between portrait and landscape

Fixes: 158240727
Change-Id: I51da6b124ffcd867322ee699e3908847e1df7ecd
2020-06-19 18:02:30 -07:00
Selim Cinek
2a1cab1192 Changed the landscape experience of quick settings
When introducing Media into quick settings, the landscape
experience never really worked well. The music player
would be cut off on the bottom and users could never
reach their playback controls.
Instead of the vertical layout, we're now rendering
quick settings side by side with the player.

Using some densities, this could still be too large,
so we're also introducing a scrollview for the
expanded quick settings.
This also makes sure all the paddings and spacings
are up to spec.

This also fixes behavior where a user could still collapse
the panel while the user switcher was showing.

Bug: 154332040
Test: atest SystemUITests
Change-Id: I3b8babc2cc6a91e19824b67f043aa5044dc370b9
2020-06-12 16:26:53 -07:00
Matt Pietal
8799e07a5e Controls UI - Fix detail panel landscape height
In landscape, use most of the available height in order to maximize
area for the enclosed activity.

Bug: 155905883
Test: manual, use landscape and popup detail panel
Change-Id: I4342b63b72f3a3b2538e61f3736d4289ac333bad
2020-05-11 08:52:35 -04:00
Aran Ink
cf03827a81 Add overflow menu to GlobalActionsDialog.
Test: atest GlobalActionsDialogTest
Test: Power menu items beyond the 3rd will appear in a dropdown menu instead of being truncated when controls are available. If controls are disabled (ex. 'adb shell settings put secure systemui.controls_available 0'), all items should still display in older versions of GlobalActions. Items in power overflow menu are both short- and long-pressable.

Fixes: 152625023

Change-Id: Icdbf8eb7e79a61d490d484f207eeedc47c4882c5
2020-04-13 17:14:02 -04:00
Matt Pietal
5f478c7f39 Controls UI - Marquee + dynamic column count
Make the controls more legible across different displays.

1. Support marquee in the status field to support long strings
2. Adjust margins for different dp devices
3. Dynamically adjust the max number of columns based on fontScale and
screen width in dp

Bug: 152765942
Test: visual, use different display/font sizes

Change-Id: I72665f1164ff30e0a5746adb9fdc89f00edd35d4
2020-04-06 08:06:51 -04:00
Mady Mellor
818eef04ee Update statusBarHeight & bubblePaddingTop on config change
* Status bar height can change and we're not accounting for it
* Introduces landscape value of bubblePaddingTop that is smaller so
  that there is more space for app content in landscape

Bug: 135487618
Test: manual - requires changes in other CL's in stack, but then:
             - have bubbles, expand stack
             - rotate device
             => notice that spacing between status bar + expanded view
                is smaller in landscape & larger in portrait
Change-Id: Ib6e98c7ee51408fb8bb51ecb3b4875fc618de8b3
2019-08-22 13:26:13 -07:00
Fabian Kozynski
b1aee81e0e Visual changes in QS and made targets clickable
* Added clickable targets and intents to Next alarm, Ringer mode and
QSCarrier items. This includes making the tap targets 48dp high.
* Added contentDescription to alarm icon in QS Header info
* Changed icons to ones without inset so views are properly aligned
* Made text in QS header marquee
* Reduces vertical margin between tiles in landscape to fit 2 rows (when
not in VPN).
* Correctly align all children of QuickStatusBarHeader that should be
aligned

Test: visual
Test: manual, tap targets go to correct destination
Fixes: 129350749

Change-Id: I6cc984ec4d58bf1afc9eb6822ded786591f5c7b8
2019-04-18 11:27:21 -04:00
Fabian Kozynski
0e8449f2e3 Visual changes to QS.
* Changed spacing in QS
* Removed divider in QSFooterImpl
* Fixed size of carrier icons in QS header
* Fixed overlapping animations on expanding QS

Fixes: 124464727
Fixes: 128920517
Test: visual
Change-Id: I7d56b9db7ce06b59291522a3bbfaa8cb80aaebce
2019-03-21 14:03:39 -04:00
Anthony Tripaldi
ea0236d0ec Add tool tip view for first run of volume dialog to notify users of odi
captions functionality.

Bug:128970574
Change-Id: I4710fd1d84f4116e003c14720a2ce55c5b3ff899
Test: manual
2019-03-21 10:25:11 -04:00
Fabian Kozynski
4e76d1f32b Change visuals for expanded QS
* Moved status icons to the left
* Moved carriers to top right of QS
* Moved edit button to left of QSFooter
* Moved PageIndicator to always be in Footer
* Added build number to footer.

Test: manual using landscape and RTL
Bug: 124464727
Bug: 124466547
Bug: 126759381

Change-Id: I5e5b5bf559d75a8520e772e96b8c4e77ffb72d84
2019-03-07 17:34:52 +00:00
Fabian Kozynski
b10ef8ddff Vis fixes to Privacy chip
Test: manual
Fixes: 124467719
Change-Id: Iaba017cee0992cbebe153d70c0bddbee44b553ec
2019-02-15 15:10:47 -05:00
Fabian Kozynski
ef12449cf8 Version 2 of Ongoing Privacy Dialog
Minor changes to colors and layout of chip.

Redesign of dialog using new mocks.

Dialog launches Permission Hub

Test: visual & atest PrivacyDialogBuilderTest
Fixes: 117646163
Bug: 112331475

Change-Id: Ic8008f05fcb139c2581794abbb47c00819c20d7f
2018-11-16 09:16:25 -05:00
Amin Shaikh
6a298d6202 Ensure QQS does not clip tile views.
- Remove qs_quick_tile_space_width resource in favor of specifying the
max size for QQS when the notification panel's size is large enough.

Change-Id: I6a3ee05fa20d6e8f8f4bd688d310de6a242d26f9
Fixes: 110276500
Test: manually changing window density/size and viewing QQS
2018-06-19 15:01:18 -04:00
shawnlin
511623c874 Fixed flickering when quick tap on brightness bar
Reduce the height of brightness mirror view.

Change-Id: I998932dea51659cbba0a8484973b3281f595c46e
Fixes: 79927315
Test: quick tap on brightness bar and observe the result
Test: atest google/perf/jank/SystemUI/UbSystemUIJankTests-Trace:android.platform.systemui.tests.jank.SystemUiJankTests#testChangeBrightness
2018-06-07 10:31:37 +08:00
Rohan Shah
3090e79948 [QS] Add PageIndicator to footer
Allow the footer to provide a new PageIndicator to the QSPanel.
Wrapped the cellular text/info in a LinearLayout such that it
fills the space available and updated params for the action
container depending on what orientation we're in.

Since we're swapping the page indicator, it's important not to
lose num pages/location, so additionally storing & resetting
those values when swapping.

Test: Visually
Change-Id: Iffa8a47601a20d3386abd6f77ed120ece552b726
Fixes: 77152480
2018-04-13 11:34:47 -04:00
Matthew Ng
603b3298ff Avoids vibration over deadzone in navigationbar
Removed the deadzone as a view and converted to a class that is attached
to NavigationBarView to determine if the incoming touch events should be
consumed by the deadzone.

Change-Id: I5bf6a9e48ba9fa2305ec98acfc537d14cb8cf725
Fixes: 77235132
Test: tap just above the home button in portrait
2018-04-02 11:48:21 -07:00
Rohan Shah
1439464dd1 [QS] Change spacing for QQS in landscape
Add strict/static spaces between tiles when in landscape orientation and
retain the filler spaces in portrait orientation.

Test: Visually
Bug: 73808887
Change-Id: I755c161cd2cdad557be3a4867a353b96e49aba5c
2018-03-21 16:59:18 -07:00
Amin Shaikh
6adcacc5d2 Implement brightness slider spec.
Bug: 72991368
Test: visual
Change-Id: I5168f0a30d8a325c3c8d84ff26419240db18a634
2018-02-22 16:03:17 -05:00
Selim Cinek
9e87cba5a9 Making the notification always center horizonally
The notification panel always center horizontal, since
it could lead to an offcenter notification sometimes.
Also applying the gravity correctly.

Change-Id: I2056dae0dfc1e4625e7903511464dc3edd8ac3f5
Fixes: 27566718
Test: rotate, observe HUN location after rotation
2017-02-17 13:29:54 -08:00
Jorim Jaggi
2917dc4918 Add shadow for minimized dock
Bug: 27972642
Change-Id: Ic4c8145f61694ff2bb0e237da1142093c6a4d965
2016-04-12 19:17:24 -07:00
Jason Monk
6573ef2079 Work on QS landscape fitting
Battery/DND detail panels still need some work.

Bug: 27276984
Change-Id: I0c94d1ecdbe8c230a3f991daaf65dfbd81d08b85
2016-04-06 12:46:28 -04:00