Commit Graph

3673 Commits

Author SHA1 Message Date
Evan Laird
638ebb3254 Listen for EXTRA_PRESENT changes
ACTION_BATTERY_CHANGED can pass a boolean EXTRA_PRESENT which would
alert listeners that a battery may or may not be present. SystemUI now
wants to show an error battery state instead of a potentially misleading
status in this situation.

Bug: 169935148
Test: adb shell cmd battery set present 1
Change-Id: I7d576248bb9931059100facb67ca6b46e81e554e
Merged-In: I7d576248bb9931059100facb67ca6b46e81e554e
2020-12-11 16:05:37 -05:00
timhypeng
b71aeae0cb Apply animation for Media Ouput Switcher dialog
-Inherit InputMethod animation and create MediaOutputDialog animation

Bug: 155822415
Test: manual test
Merged-In: I42506f065da687c4ba6ddadca0f3b7a1c55f1be7
Change-Id: I42506f065da687c4ba6ddadca0f3b7a1c55f1be7
2020-12-02 03:30:44 +00:00
timhypeng
411e7a5b7c Add animation when switching output device
Bug: 155822415
Test: manual test
Merged-In: Ia3370222427b77099d987d59d5d5fd08c11557d7
Change-Id: Ia3370222427b77099d987d59d5d5fd08c11557d7
2020-12-02 03:29:22 +00:00
timhypeng
5fc4c2883d Add "Stop" button for remote device
-Add "Stop" to stop remote media session
-Refine UI layout
1. Adjust size of head icon and apply defined dimen value
2. Move list padding inside the list to prevent truncating the list
3. Remove group-related view(I will add it in recycle view when the group feature is ready.)
-Add MediaOutputDialogTest
-Rename PAIR_NEW to CUSTOMIZED_ITEM_PAIR_NEW
-Integrate more UI view in setTwoLineLayout()

Bug: 155822415
Test: atest MediaOutputAdapterTest MediaOutputBaseDialogTest MediaOutputControllerTest MediaOutputDialogTest
Merged-In: Ie6a917c56a0ef97f772a8f43742afd2ee61e407f
Change-Id: Ie6a917c56a0ef97f772a8f43742afd2ee61e407f
2020-12-02 03:29:07 +00:00
timhypeng
3e5de04302 Add Media Output Dialog for Output Switcher
-Add MediaOutputBaseDialog to provide common method for different media operations UI
-Add MediaOutputDialog for showing Bluetooth device
-Add resources for background image, style and layout
-Add MediaOutputBaseDialogTest for unit test

Bug: 155822415
Test: atest MediaOutputBaseDialogTest
Merged-In: I3086a4049f240870ca1ad870946d6848e500b561
Change-Id: I3086a4049f240870ca1ad870946d6848e500b561
2020-12-02 03:23:47 +00:00
timhypeng
c23f9171ce Add controller for Media operation
-Access LocalMediaManger to display avilable output devices information
-Access LocalMediaManger to do media operation, such as volume adjustment,
switching output device, grouping
-Access MediaController to show media content information
-Add MediaOutputControllerTest for unit test

Bug: 155822415
Test: atest MediaOutputControllerTest
Merged-In: I9eb6e3b0a6e584637aecb4132dbc2b138c6d1530
Change-Id: I9eb6e3b0a6e584637aecb4132dbc2b138c6d1530
2020-12-02 03:21:14 +00:00
Jeff DeCew
a49a320e49 Disable player's "Dismiss" button when notification is not dismissible.
Bug: 169271494
Test: manual
Change-Id: I3c2a73e4885642965ec553387b5e91f0cb16ff2f
Merged-In: I3c2a73e4885642965ec553387b5e91f0cb16ff2f
2020-10-14 10:16:26 -04:00
Fabian Kozynski
e0123b0d23 Merge "Add TileAdapterDelegate" into rvc-qpr-dev 2020-09-25 14:44:39 +00:00
Fabian Kozynski
a38a4a1c0c Merge "[DO NOT MERGE] Reduce padding in QS for small screens" into rvc-qpr-dev 2020-09-24 17:56:43 +00:00
Fabian Kozynski
7a5e333ba5 Add TileAdapterDelegate
Use an AccessibilityDelegate for the actions in QSCustomizer. Adding or
removing a tile can now be done with the click action, whereas moving or
adding to a particular position require a context action.

This removes the old custom dialog and improves the overall
accessibility.

Test: manual
Test: atest TileAdapterDelegate
Bug: 168039987
Bug: 140366995

Change-Id: Ib5b19aeebb54c46573555563c3f39bd922b68896
Merged-In: Ib5b19aeebb54c46573555563c3f39bd922b68896
(cherry picked from commit ac22e5bf36)
2020-09-23 19:12:22 +00:00
Fabian Kozynski
6f3c88ab86 Swap seekbar vert padding to keep height fixed
Reduce the vertical padding of the seekbar when it's enabled by 2dp to
account for the extra height in the track. That way the height of the
SeekBar view is always 33dp.

This has a nice side effect of properly setting the height of the track
when resuming.

Bug: 160242262
Test: manual
Change-Id: I9b6888f2a6bf5fb118075dea3f849618350ec18b
(cherry picked from commit b84e6ba27f)
2020-09-23 18:32:20 +00:00
Fabian Kozynski
c3182c5480 [DO NOT MERGE] Reduce padding in QS for small screens
Reduces the padding between tiles in QS when the screen is <740dp
high in portrait. That way, more rows can fit in some cases (high
display size, security footer).

Test: manual
Bug: 168561056
Change-Id: I41cdb3bccd93fbdcbaa99742e450dd72e4b2effd
2020-09-21 19:58:22 +00:00
Fabian Kozynski
370971972e 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
(cherry picked from commit a3a7c45f36)
2020-09-16 15:03:59 +00:00
Beth Thibodeau
6fcdb6bf9e Remove delete action from notification
Fixes: 153621404
Test: manual
Change-Id: I1c6046a84d15719c5bad8a840037fa08be05fe65
Merged-In: I1c6046a84d15719c5bad8a840037fa08be05fe65
(cherry picked from commit 1700fdca78)
2020-08-20 20:07:17 +00:00
Fabian Kozynski
cbb1ec8a4a Fix padding in management activities
Remove the inherent margin of the controls tiles and exclusively use the
item decorator. As we are only assigning margin to the top (to prevent
extra margin at the bottom) of each group, we double the top margin.

Fixes: 164171322
Test: manual
Change-Id: Id337471f3ac81855940da598b4396257ed829311
2020-08-17 16:05:31 -04:00
Lucas Dupin
e5f5be9fd2 Shorten month on AOD date
Test: visual
Fixes: 161186825
Fixes: 163309955
Change-Id: I8e62eef0f32812380bc1d19d87d7611bd395eabb
2020-08-11 00:18:50 +00:00
Lucas Dupin
afe934fbfb Change date format for better 'ja' compatibility am: 83f4bc398e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12345066

Change-Id: Ib6893aae866f86d7c241a8e43daefe7bd1b745de
2020-08-10 20:35:38 +00:00
Lucas Dupin
83f4bc398e Change date format for better 'ja' compatibility
eeeMMd doesn't properly translate dates in Japanese.
According to ICU team, we should be using EEEMMd instead.

The date output will be different in ja, ko, th out of 728 locales.

Test: visual
Fixes: 161186825
Change-Id: Ib551d532f08b89be3a0679c44c51b65f493f1a65
(cherry picked from commit 18bd42434f)
2020-08-10 16:55:04 +00:00
Fabian Kozynski
2e0f351d35 Add guts to media player on long press
Adds the following:
* Button for accessing settings
* Button for dismissing player (similar path to when a package is
uninstalled)

Guts will close automatically if:
* QS is collapsed
* Media carousel changes pages

Also, flattened the view hierarchy to support animations between states.

Test: manual
Test: atest com.android.systemui.media
Bug: 156036025
Change-Id: I340e0b37393573f81a3bf12d5e453eccf5982473
Merged-In: I340e0b37393573f81a3bf12d5e453eccf5982473
(cherry picked from commit 429360fb39)
2020-08-10 12:51:33 -04:00
Fabian Kozynski
9a85dc9c0a Merge changes from topic "permission_chip" into rvc-qpr-dev
* changes:
  Restricts notified app ops based on flags
  Add back privacy chip
2020-07-23 13:45:26 +00:00
Fabian Kozynski
d074a54435 Add back privacy chip
This adds back the privacy chip classes (Controller and view).

Change to using Executors and DeviceConfigProxy, also fix tests that
were flaky before.

Test: SystemUITests
Bug: 160966908
Change-Id: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
Merged-In: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
2020-07-20 14:27:28 -04:00
Beverly
d50eb6eeb5 Update PowerNotificationWarnings
Test: manual
Fixes: 160969580
Change-Id: I451338d8fcad71d1e3d95cbc08808d76f8b7d991
2020-07-15 17:04:13 +00:00
Vinit Nayak
83308950ee Add ID to secondaryOrientationHandle for tests
Bug: 159763136

Change-Id: I0ad91d995c79415ad8b5cf849f8fd0c24bd0fd7a
2020-07-13 19:52:39 +00:00
TreeHugger Robot
c523ddb24a Merge "Make icon sizes consistent" into rvc-dev am: 44d6bc8594
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12028265

Change-Id: I696dd4869af72ecc753d539623f74a0c1ace5a1b
2020-06-29 17:15:45 +00:00
TreeHugger Robot
44d6bc8594 Merge "Make icon sizes consistent" into rvc-dev 2020-06-29 17:14:35 +00:00
Robert Snoeberger
ec645b4c49 Make icon sizes consistent
Updating sizes of icon based on code review discussion in ag/12013470.

Bug: 159990829
Test: manual - Verify icons (app and device) are same size in media
player.
Test: manual - Verify fallback device icon and app icon are the same
size.

Change-Id: I7dd12145ecdb96bdf4a7dc4e6e095e306453633b
2020-06-29 10:04:52 -04:00
TreeHugger Robot
b1915fa857 Merge "Increase pointer size, move closer to bubble" into rvc-dev am: b56a22487f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000165

Change-Id: I03014f7676c0081b984e6a91b349a88da82960a1
2020-06-26 23:28:08 +00:00
TreeHugger Robot
b56a22487f Merge "Increase pointer size, move closer to bubble" into rvc-dev 2020-06-26 23:17:03 +00:00
Fabian Kozynski
66ac33b97d Merge "Media - Limit size of output switcher and app name" into rvc-dev am: 3d8df7b6c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11973247

Change-Id: I899bcbcbfa19274d127e781fcc3dfb072ea6adf2
2020-06-26 18:52:05 +00:00
Fabian Kozynski
3d8df7b6c2 Merge "Media - Limit size of output switcher and app name" into rvc-dev 2020-06-26 18:37:37 +00:00
Matt Pietal
bc2e4b1564 Merge "Global Actions - Power menu too tall in landscape" into rvc-dev am: 0cef70e5d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004852

Change-Id: I511f7a71dad97ff21a73b8fabf200825c36645bf
2020-06-26 17:34:37 +00: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
Lyn Han
ae749fb5f3 Increase pointer size, move closer to bubble
Make selection easier to see

Bug: 158482996
Test: manual
Change-Id: I34f80d26bc30f9b46edcfad11ac655c895a58784
2020-06-25 17:27:19 -07:00
TreeHugger Robot
ebc86a0717 Merge "Add string for "See more apps"" into rvc-dev am: 11e7231a75
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987678

Change-Id: Ic5819068053e19fe0dc7e1b3dd66ade6f2e1d8af
2020-06-24 16:29:36 +00:00
Fabian Kozynski
91280c30c5 Add string for "See more apps"
Test: manual
Fixes: 159792758
Change-Id: I9b116fef0bfaad7c40bb9a9a109e0abf1b005b4c
2020-06-24 10:57:23 -04:00
Fabian Kozynski
f2e6891752 Media - Limit size of output switcher and app name
Make sure that there is a gap at least 10dp to the left and right of center
vertical in media view, between app name and output switcher.

Test: manual
Fixes: 159708142

Change-Id: If142bd920b6921c9d82fa2d6dfb2595f123df2ac
2020-06-23 14:41:47 -04:00
Fabian Kozynski
fbc1b63f9f Merge "Add divider between QS and media" into rvc-dev am: bd0b819c21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11953553

Change-Id: I6421116de90db3faa838f0a28dc167bcdb83f7b5
2020-06-22 21:54:40 +00:00
Fabian Kozynski
a0d0503b0d Merge "Change color of seamless chip border" into rvc-dev am: 9de64deb89
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11953545

Change-Id: I9a4418454476d2e7a602e3fe89d1bd335a299c8d
2020-06-22 20:36:47 +00:00
Fabian Kozynski
42c541e6c7 Add divider between QS and media
Test: manual, portrait and landscape
Fixes: 159484242
Change-Id: I279ca402e7893c9213718b345cc79ecd72beb4e8
2020-06-22 16:28:10 -04:00
Fabian Kozynski
349967a098 Change color of seamless chip border
The border should be fixed at #FFFFFF @15%.

Test: manual
Fixes: 159359398
Change-Id: Ie423e1ba8b7317e167d3b498ba9112ed4cada822
2020-06-22 13:38:07 -04:00
Fabian Kozynski
32026857ab Merge "Make SeekBar 1dp tall when disabled" into rvc-dev am: 6a75f1332f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11936020

Change-Id: Ia4f9496f9709482fcb0eb075311ea03a0a9f49b0
2020-06-22 16:49:30 +00:00
Fabian Kozynski
6a75f1332f Merge "Make SeekBar 1dp tall when disabled" into rvc-dev 2020-06-22 16:33:04 +00:00
Fabian Kozynski
8a9516d762 Make SeekBar 1dp tall when disabled
Test: manual
Fixes: 159369236

Change-Id: If28b65b66b78595d60a67e4f4c8deadf0393c1a0
2020-06-22 09:34:02 -04:00
TreeHugger Robot
faea9c3065 Merge "Reduce device fallback to just icon" into rvc-dev am: 1d53e823fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11936396

Change-Id: I02141e8a72175a5995c93f951bdf9b73d9a48eb8
2020-06-22 06:01:56 +00:00
TreeHugger Robot
1d53e823fd Merge "Reduce device fallback to just icon" into rvc-dev 2020-06-22 05:53:52 +00:00
Robert Snoeberger
0734043a33 Reduce device fallback to just icon
Fixes: 159231146
Test: manual - Cast YouTube and look at output switcher chip in player.
Verify that there is only a Cast icon.

Change-Id: I9dcd5f642e3f7400a9442c05b5de0566704af38a
2020-06-22 00:25:55 -04:00
TreeHugger Robot
8f543e097a Merge "Let biometric prompt button text wrap to new line" into rvc-dev am: 3987866cd7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11936774

Change-Id: I39c14b59cac6f8dd3dcdd5d5dffd133ef5a0b16e
2020-06-20 02:57:51 +00:00
TreeHugger Robot
3987866cd7 Merge "Let biometric prompt button text wrap to new line" into rvc-dev 2020-06-20 02:45:17 +00: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
Beth Thibodeau
b11486a94b [DO NOT MERGE] Support toggling resumption in Settings am: c1bc307bce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11817534

Change-Id: Ib1a556d8e8a7d24d049d62f6628ab38163b21c79
2020-06-19 22:40:24 +00:00