Commit Graph

141 Commits

Author SHA1 Message Date
Caitlin Cassidy
0ae9b43822 [Media Recs] Hide the title / subtitle views if none of the albums have
titles / subtitles so that the album art is centered better.

This required setting ConstraintSet values programmatically, which
re-surfaces the quirk we noticed earlier where if we set any
ConstraintSet values programmatically, then all the values in the layout
XML are erased. So, this CL also moves all constraints out of the layout
XML and into the ConstraintSet XML instead.

Fixes: 229377153
Bug: 223603970
Test: manual (verify albums are more centered) (see screenshots in bug)
Test: MediaControlPanelTest
Change-Id: Ibb3c8d9d22b30a642fef38b170c42cebdaec28cc
2022-04-21 16:32:41 +00:00
Caitlin Cassidy
f6453bc32f [Media Recs] Add titles and subtitles to the expanded layout.
Bug: 223603970
Test: manual (see bug for screenshot)
Test: atest MediaControlPanelTest
Change-Id: Iba43aee9405a60d78d00c8945860547713adf274
2022-04-15 13:53:15 +00:00
Caitlin Cassidy
09b9a643e7 [Media Recs] Some updates to smartspace recommendations layout:
- Only show 3 albums instead of 6
 - Remove padding from app icon
 - Update various sizes

This updates both the expanded and collapsed layouts.

Bug: 223603970
Test: manual (see bug comment for screenshot)
Test: atest SystemUITests
Change-Id: I5c22b38b6195658ae47c1a48289bac71d0f92567
2022-04-14 13:32:51 +00:00
Caitlin Cassidy
f9942f0ad8 [Media UMO] Show times when scrubbing.
Bug: 209656742
Test: manual (see video in attached bug)
Test: atest MediaControlPanelTest, SeekBarViewModelTest,
SeekBarObserverTest

Change-Id: I32687652d20715dc9d4775ec149e04e4473e9e1b
2022-04-07 01:10:15 +00:00
Christian Göllner
d7b3be3e0b Merge "Media layout changes for tablets" into tm-dev 2022-03-23 20:44:00 +00:00
Christian Göllner
145bbfdfbd Media layout changes for tablets
- Changes height on tablets to 251dp instead 184dp
- Aligns media actions + seek bar to bottom
- Aligns title/artist + play/pause button above media actions

Fixes: 221823467
Test: Unit tests + Manually
Change-Id: I8b850253bd1aa9ed0bc3648326582d2c986b42ca
2022-03-22 23:21:34 +00:00
Michal Brzezinski
193baa3ab3 Renaming SplitShadeHeader to LargeScreenShadeHeader
Bug: 222472794
Test: code compiles and works
Change-Id: Ifcd1f11546cfb84a4760fb8c2cd134bdf366f8c2
2022-03-22 15:37:20 +00:00
Beth Thibodeau
f65563f813 Remove old layout and flag
Since the new layout is complete and can handle notification action buttons,
we can remove the old one now.

- Deleted layout files (xml and PlayerViewHolder), and moved
PlayerSessionViewHolder into MediaViewHolder
- Removed the flag MEDIA_SESSION_LAYOUT
- Refactored MediaControlPanel to be more readable

Bug: 218875984
Test: atest com.android.systemui.media
Test: atest QSPanelControllerTest QuickQSPanelControllerTest
Change-Id: I37681542dec5cf10ec7346aa9f888f8f890d2c11
2022-03-18 17:57:22 -04:00
Beth Thibodeau
f9e74f5fce Add fallback media layout for notification actions
Adds more button slots which are dynamically shown depending on which actions
are supported for the app's media.

When PlaybackState actions are available, the large play/pause button
will appear, along with prev/next on either side of the progress bar.
When Notification actions are used, those buttons will be hidden and up
to 5 actions will be shown to the right of the progress bar instead.

Also refactored view holder classes and test since both templates have 5
generic action buttons now.

Fixes: 218875984
Bug: 218876469
Test: atest MediaControlPanelTest
Change-Id: I464834d2eee53d661f2407f6280e2856c96c63ac
2022-03-09 08:57:16 -05:00
Beth Thibodeau
50b665e985 Add compact version of new layout for phone landscape
Splits the new session layout into collapsed and expanded versions. If
the new layout is being used, the collapsed version will be used in
landscape orientation on smaller devices, and everywhere else will use
the expanded version. No change for the old layout (collapsed version
still used always in QQS and keyguard)

Bug: 209655299
Test: visual - toggle flag, rotate device
Test: atest KeyguardMediaControllerTest QuickQSPanelControllerTest
Change-Id: I5df62996a4823edd19b1bdc217e08cab13d5b7b0
2022-02-03 12:14:19 -05:00
Fabian Kozynski
3cd40e0641 Fix some entrance animations for new QSHeaders
* Use qsVisible to indicate whether the shade is visible and the header
should be shown.
* When in lockscreen, use
LockscreenShadeTransitionController#dragProgress to track shade
expansion.
* Use this shade expansion to fade out the KeyguardStatusBarView

Test: manual, with and without flag, handheld and split shade
Test: atest SystemUITests
Bug: 202847414
Change-Id: Id57adff2fd75eba86832e8790816ef2d9afcf83d
2021-12-15 11:22:06 -05:00
Fabian Kozynski
3555ebc8b5 Add privacy indicators to combined QS header
Use alpha 0 in icons and battery when privacy indicators are visible in
QQS constraint.

Test: manual, using handheld and split shade layout
Bug: 202847414
Change-Id: I8b523c9f87c78fd4eac99a421eebaec90e37cadf
2021-12-15 11:10:24 -05:00
Beth Thibodeau
659f163d03 Merge "Fix alignment for RTL layout" into sc-v2-dev 2021-11-08 15:22:29 +00:00
Fabian Kozynski
8896557ad5 Expansion animations
Add expansion animation to the header. Only put layout params that
change in the ConstraintSet so they are as small as possible. Layout
params that don't change are set in the layout file.

Test: manual
Bug: 202847414
Change-Id: Ibd61bd02a0266da87eabe3be3d307af74df2c3dd
2021-11-04 11:34:01 -04:00
Fabian Kozynski
94f300dfe5 [DO NOT MERGE] Unify QS Headers in a ConstraintLayout
This is a POC and is missing several features:
* Tight integration with the other surfaces to set margins
* Expansion animation from QQS into QS
* Privacy indicators

To enable:
adb shell am broadcast -a com.android.systemui.action.SET_FLAG --ei id
501 --ez 1

Test: manual
Bug: 204204226

Change-Id: I5b2d5f5880ceff1adb1e4365cde15171c5c15d38
2021-11-04 10:42:42 -04:00
Beth Thibodeau
01b8ebf264 Fix alignment for RTL layout
Expanded layout already uses wrap_content which does display correctly
in RTL, so fixed the collapsed layout to do the same

Fixes: 204032375
Test: visual
Change-Id: Ifcdd9c1d90e03ee54789421c0d6eb1dd3abd4a2f
2021-11-02 13:32:29 -04:00
cecilia
3feb2954f0 Make the recommendation card's title to be one line, and the blur
overlay for the cutting off text.

Screenshots:
- Largest text: http://screen/57TPBhdhhv2w2t4;
- Default text: http://screen/NqWZZLoctPs7ZGw.

The shorter app name like Spotify has no-op for default sizes:
http://screen/8ft8thSA3yrtZXs.

Fixes: 193503292
Test: Local builds

Change-Id: Ie4a02e28f20092db68c14b420ef88a5314c4940a
2021-09-22 20:18:00 -04:00
Beth Thibodeau
e1103a98ca Use label instead of cast icon in output switcher
When the device is null or not enabled, disable the output switcher chip
and display "Other device" as a fallback value, instead of a cast icon

Fixes: 159231146
Test: atest MediaControlPanelTest
Change-Id: I29ece6d32ca327d18c1e92e14f93876959c00ff3
2021-09-03 20:10:38 +00:00
Beth Thibodeau
c4e1c545e2 Reduce height of expanded media controls
Total height is now 192 dp. Reduced album art size and some padding for
expanded media control layout. Also adjusted album art size and padding
for expanded recommendations card to fit

Bug: 189700268
Fixes: 194492458
Test: visual
Change-Id: I3ca096e663d10a05abee2a645dacfe4ce001597c
(cherry picked from commit 69377262a4)
2021-08-10 02:18:51 +00:00
Beth Thibodeau
1781ae29ae Adjust media layout to spec
- In compact view, align buttons with artist text
- Use primary accent color for solid backgrounds
- Smaller bottom margin in QQS

Fixes: 187421292
Fixes: 190704124
Test: visual
Change-Id: I4a7500fbabccb9a8161e7587c6e547fc90ba9c82
2021-06-24 20:03:21 -04:00
cecilia
c00205a3ad Update Smartspace media recommendation card based on Droidfood's
feedbacks.

- Sort the active media player before the Smartspace media recommendation card.
- Add the click ripple effect to the media recs.

Fixes: 189944948
Fixes: 189949373
Bug: 186586388
Test: Local builds
Change-Id: I55ba2f7c8c03fb049ff154c9fb4be99323683015
2021-06-13 17:12:33 +00:00
cecilia
e75ba2d62c Update the media recommendation card UI for only showing recs from one
app.

Screenshots for new UI:
- http://screen/4zcR4ofEhA5tT3Z;
- http://screen/7SSKm6KkMFWEknM.

Also adjusted to make the layout fits the zoomed-in display.
Before fixes:
- http://screen/96aPMjUE5WC8thb;
- http://screen/6oFuAcemQ9PqnBa.
After fixes:
- http://screen/8F72QZ3SeXSSgV6;
- http://screen/5jfwr7GWuFoNJry.

Bug: 187944091
Fixes: 187827805
Test: Local builds
Change-Id: Id64a336891b45c39d14ce5f3b858cf1f019aa9fe
2021-05-20 17:52:03 +00:00
Beth Thibodeau
cf48e278f0 Update resume icon and colors
Use grayscale launcher icon when in resume state
Adjust accent color used for output switcher and active (notif) app icon

Test: visual
Test: atest com.android.systemui.media
Fixes: 185681682
Fixes: 176177555
Change-Id: Idf358dfd7111f3910367960d6cff5e26cd7889c6
2021-05-13 15:25:27 -04:00
Beth Thibodeau
34d64788a1 Adjust size of action buttons
Increase height to 56dp in compact mode, and scale icons down to 24dp

Bug: 187421292
Test: visual
Change-Id: If5e691a77ae03634eb7574eb383d5a31736c26ee
2021-05-06 20:55:23 -04:00
Anna Zappone
8315904e81 Merge "Handle work profile, DND state, app pauses" into sc-dev 2021-05-04 15:16:52 +00:00
Cecilia
08d2eee578 [BugFix] Fix the media reco expanded layout when there is less than 6 items.
Screenshots:
- Before fix: http://screen/8PQhpUbKU88shZD
- After fix: http://screen/634Fw3ik5TKzrJ6; http://screen/67qumVeRFmEVThH

Bug: 186989643
Test: Studio builds
Change-Id: I7d7eacbfad1568c53f21060bc342c720c002b03d
2021-05-03 16:32:07 -04:00
Anna Zappone
1b12d3d473 Handle work profile, DND state, app pauses
Listen and respond to changes in state on background thread. Store in-memory to avoid
requerying frequently

Test: PeopleSpaceWidgetManagerTest, PeopleTileViewHelperTest,
PeopleSpaceUtilsTest
Bug: 182891880
Change-Id: Id0142b02bb549275c77d8940cda4eb1f0bf4e947

Change-Id: I65712a7a43d8956499533689fe77afbeeac5bd6e
2021-05-03 17:23:28 +01:00
cecilia
3f2e85a9c4 Update Smartspace media recommendation card appearance to match the latest mock.
A contextual card header is added, and also the expanded version of recommendation card.

Screenshots:
[Compact]
- http://screen/U3SPZQHPYLyoU4t
- http://screen/8ccMqUqUmBQUvmd
[Expanded]
- http://screen/9ASnXWGHWoyph2B
- http://screen/A6hzbLDjpfsjVkA

Demo: https://drive.google.com/file/d/1iRZBhC81q-HflRQDUgzMbNeBagkAo9aS/view?usp=sharing

Fixes: 186165627
Test: Studio builds
Change-Id: Ib7f65bdcbe7ede1901c7969d04f3efbbc7c2461d
2021-04-29 19:36:52 -04:00
Beth Thibodeau
819ec8aeaf Updated layout for more compact player
- App icon is now on the corner of album art
- Small player is condensed, with smaller art
- No album art will instead show a fallback view with device icon
- Device name shows in output switcher
- Adjusted colors and dimens to match spec
- Fixed bug where too many compact actions could be shown

Test: visual
Test: atest com.android.systemui.media
Bug: 176177555
Bug: 182292357
Change-Id: I56ec5c5f1188f7547b6e74a2f9bf8d1ad2ee21e4
2021-04-27 19:58:45 -04:00
Anna Zappone
1889a57132 Polish updates
- Fix strings for accessibility
- Use newly added targetCellHeight and reduce placeholder padding to fit
the lower cell heights of some devices
- Remove shadow from Work Profile badged icon

Bug: 184857890, 185137298, 185891880
Test: local
Change-Id: Ia0b93c80b1019c805b9644bb1d51b009fc529ebe
2021-04-22 20:08:59 +00:00
Anna Zappone
2015882fda Separate initial layout from placeholder layout
We show different strings after reboot versus in the widget picker.
Updates the placeholder & initial layout for mocks.

Bug: 183085064
Test: none
Change-Id: I4ec4415eee35d584316c2aa4d17a1dd8ad6061f3
2021-04-15 11:18:19 +00:00
Anna Zappone
a373e1ed5a Merge "Use new widget functionality to reconfigure widget" into sc-dev 2021-04-13 15:06:18 +00:00
Anna Zappone
d7a54bfa66 Use new widget functionality to reconfigure widget
Users can now reconfigure which conversation shows on their widgets.

Bug: 183084171
Test: PeopleSpaceWidgetManagerTest
Change-Id: I0eab87c88408c8b8039f654177891e62762109c3
2021-04-13 10:29:41 +00:00
cecilia
629f3cb0bb Add Smartspace media card in media carousel when the Ss data is available.
Test: Tested manually on local builds
Bug: 182813345, 181365922
Change-Id: I143b8df12f9ca65936f4871a7a8985ef9495b61e
2021-04-10 01:30:10 -04:00
Anna Zappone
333ed21f48 Merge Missed calls onto tiles by Contact Uri
Doesn't migrate pre-existing users since only in droidfood and won't
break the current experience (just add additional functionality).

Test: PeopleSpaceUtilsTest, PeopleSpaceWidgetManagerTest
Bug: 163617224
Change-Id: If2ac7a09e4e8efa18c816f1382e3df5235c4b656
2021-03-24 21:12:18 +00:00
Anna Zappone
c531f63f8c Add layout for 1x1 size, update 2x1
This allows users a smaller width resize for the People Tile widget, and
adjust the view accordingly after resize. Implements 1x1 and 2x1 mocks,
with polish remaining for 2x1.
Also fixes a crash when launching the conversation picker and bug on
removing missed call notifications.

Bug: 182377480
Test: PeopleSpaceUtilsTest
Change-Id: Ie3b16fb3e348f8edd7bb314c9f43408dca7b43e2
2021-03-15 21:14:22 +00:00
Anna Zappone
b98280defc Strings for Beta 1
Test: none
Bug: 163617224
Change-Id: I8d75a4c2bb4645ea51814db46101bf228e380106
2021-03-10 17:34:37 +00:00
Anna Zappone
469c69b53e Add new templates & show Statuses in People Tiles
Backup strings provided in the case of missing status text when icons
are provided. Implements three layouts to handle our different states.

Change-Id: I1cb81c42e4cdd75b000f52c402a7396897c0f027
Test: PeopleSpaceUtilsTest
Bug: 178792356
2021-02-17 14:15:14 +00:00
Beth Thibodeau
16ea9a6951 Use system colors for media
Instead of deriving background color from the album art, use theme colors
Also fixes layout so the output switcher touch target is not too wide

Bug: 176177555
Test: visual
Change-Id: I3de7caa6cd6870f65d50068a81af4472e0566ed7
2021-02-10 19:58:09 -05:00
Anna Zappone
5f19f33345 Update to different minWidth for testing 2x2
Test: locally
Bug: 178792356
Change-Id: I686afa1c95c7cdc1dfaa26ac67f00913097c18d9
2021-02-03 14:28:44 +00:00
Beth Thibodeau
0a2feb8a7c Merge "Update media controls layout" 2021-01-19 19:09:42 +00:00
Beth Thibodeau
b8ca4b8428 Update media controls layout
Changes to match S mocks
- corner radius to match notifications
- solid background for device chip
- bigger album art

By default this only shows the icon for app/device, but this can be
changed with flags:

adb shell setprop persist.sysui.qs_media_show_app_name true
adb shell setprop persist.sysui.qs_media_show_device_name true
adb shell am crash com.android.systemui

Bug: 176177555
Test: visual
Test: atest MediaControlPanelTest
Change-Id: I76c3130df252baee3f5d3009f9098f77bf115f3e
2021-01-15 13:07:55 -05:00
Philip P. Moltmann
eca12d241c Add mic sensor privacy QS tile
- factor out generic code from CameraToggleTile and
- reuse this generic code for MicrophoneToggleTile

Bug: 162549680
Test: Toggled tiles and looked at `dumpsys sensor_privacy`
Change-Id: Ib45c54c686e271facb78f0f14861045cb97641bf
2021-01-15 00:48:40 +00:00
Evan Severson
da6d30ab8d Create camera toggle tile
Bug: 162549680
Test: None (tested with subsequent change)
Change-Id: I35c2528fa2bf5800c3329a7b5448addf476d12ff
2021-01-14 09:53:12 -08:00
Anna Zappone
2ec38a18f7 Support single conversation in People Space widget
Via flag value, allow user to select one conversation or see all
conversations. Updates UX to make single conversation fit a 2x1 tile.

Test: PeopleSpaceWidgetManagerTest
Change-Id: I2fac077f4fab32a9a597437a3834dab27539ba75
Bug: 174850448
2020-12-08 10:58:23 +00:00
Flavio Fiszman
bf47d90aa0 Creates a widget for People Space.
Change-Id: Ic53532d7de1a7d410493e46b4398d03142f78e40
Test: Build, boot, add new widget, see it update.
Bug: 169783793
2020-10-21 14:41:54 +01:00
Andras Kloczl
7f3c2dc240 Add user name photo dialog to user creation
- Remove unused method switchTo
- Move edit user controllers from settings module
- Create new activity for new user creation
- Add ActivityStarter for delegating activity starting
- Add UserCreator for user creation logic
- Add UserCreatingDialog to display while user is creating

Test: manual test && atest EditUserInfoControllerTest
Doc: http://shortn/_cJE9o6pBZR
Screenrecords: http://shortn/_VEN6rr5ta6
Bug: 147653252
Change-Id: I6a7f1dba499e95891c69569ab731f86e6fd1dc16
2020-10-06 20:43:41 +01:00
Tony Huang
1ed148d3e7 Migrate OneHanded to WM shell (4/n)
Move OneHanded related codes, res and tests to WM shell.

Some tests add ignored currently due to permission issue.
Add another bug to trace it.

Also fix animation issue caused by wrong logic.

Bug: 161980408
Fix: 168074363
Test: manual check one handed function
Test: atest WMShellUnitTests
Test: atest SystemUITests
Test: make ArcSystemUI; make ArcSystemUITests
Test: make CarSystemUI; make CarSystemUITests
Change-Id: Ib25661d010278202ffe15fd9c4962e76e6698c21
2020-09-09 03:04:56 +00:00
Jason Chang
90fb1576fb Implement Tutorial panel for one handed
To educate users using one-handed mode showing tutorial
at top region when one handed triggered

Bug: 151800576

Test: manual
Change-Id: I255a08bf4527554ee8970c3baaf85b8956b2ca83
2020-07-29 19:26:29 +08:00
TreeHugger Robot
44d6bc8594 Merge "Make icon sizes consistent" into rvc-dev 2020-06-29 17:14:35 +00:00