Commit Graph

4133 Commits

Author SHA1 Message Date
James O'Leary
d0362cf0f5 Merge "Separate color into app color and dot color" into tm-dev 2022-05-12 16:37:40 +00:00
TreeHugger Robot
9878319331 Merge "Cancel animating the divider bar after it being released" into tm-dev 2022-05-12 12:05:59 +00:00
Jerry Chang
1882b18a66 Cancel animating the divider bar after it being released
Bug: 231974497
Test: Ran tests remotely
Change-Id: Ic2d3208e98cfcea9256d8c6f598a995641e7440d
2022-05-11 11:21:22 +00:00
Robert Horvath
d338520c9f Merge changes I49d32c18,I8e8736fc into tm-dev
* changes:
  Apply temporary PiP decor separately from overall placement
  Debounce TV PiP movements
2022-05-11 07:59:53 +00:00
Wei Sheng Shih
c122c97cff Merge "Update density dpi before load drawable." into tm-dev 2022-05-11 02:05:47 +00:00
Jerry Chang
01eda66340 Merge "Fix divider bar not shown when entering split with rotation transition" into tm-dev 2022-05-11 01:41:29 +00:00
Sergey Serokurov
eadf688621 Merge "Use bitmap width for bubble icon and app badge to calculate translation" into tm-dev 2022-05-10 17:28:08 +00:00
Hongwei Wang
6e08678675 Merge "Fix the blank PiP window when unlock" into tm-dev 2022-05-10 16:54:56 +00:00
Shawn Lin
3ab2eccace Merge "Add multi-user support for kids mode" into tm-dev 2022-05-10 12:30:16 +00:00
Jerry Chang
7675c99f49 Fix divider bar not shown when entering split with rotation transition
When launching tasks into split with rotation transition, launch won't
handle divider bar fade-in animation because wm-shell will re-render a
new divider bar to apply new rotation config. This makes sure to clear
the divider bar remote animating flag before re-rendering the divider
bar for rotation so wm-shell can finish showing divider bar after
re-rendered it.

Fix: 232043721
Test: enter split with rotation transition, verified divider bar shown.
Change-Id: Ia3040c08b897716fa9a480f2aaf1b06a76daccb4
2022-05-10 11:52:04 +00:00
wilsonshih
3dc7364ebb Update density dpi before load drawable.
When load a BitmapDrawable object with specific density, there will
decode the image based on the density from display metrics, so even
when load with higher override density, the final intrinsic size of the
BitmapDrawable can still not big enough to draw on expect size.

In order to load a bigger size BitmapDrawable object from a resources,
there should also update the densityDpi on the display metrics. But
since this kind of use case is relative rare, we use a standalone
IconProvider object to load the Drawable object for higher density, so
this resources object won't affect the entire system.

Also, since this symptom is not noticeable at high density, the
standalone icon provider only used for low density situation, so there
should be no performance loss for most high denstiy device.

Bug: 215673281
Test: atest StartingSurfaceDrawerTests
Test: snapshot to see the loaded bitmap.
Change-Id: Idd769327a8b0987f921c7d421ea1d9bb38a507ba
2022-05-10 17:05:35 +08:00
Shawn Lin
2b9e4b6550 Add multi-user support for kids mode
Listener to ACTION_USER_SWITCH intent and update the settings key when
user switched.

Bug: 231575466
Test: 1. set different settings keys for different user.
      2. switch between users and see if the setting value is correct.
Change-Id: Ia1afcb6121b296b293bef0ba7d0a0be25b857554
2022-05-10 03:03:56 +00:00
Sergey Serokurov
8d25921a22 Use bitmap width for bubble icon and app badge to calculate translation
Bubble icon view and app badge view have 0 width immediately after
ImageView#setImageBitmap is called.

Bug: 223911171
Test: manual, video: https://drive.google.com/file/d/1Mw0BaKmndLCML3VlpkCuXUO0P005CPQ1/view?usp=sharing
Change-Id: Id88cf7436395440cbecf9adc8734bdcb49936367
2022-05-09 17:03:00 -07:00
Hongwei Wang
7d33221816 Fix the blank PiP window when unlock
When the keyguard is showing or animating with the surfaces behind,
there is no need for PiP to be shown or offset-by-shelf-height.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/g6b3BQS2iH7TibwA9eqq1x
Bug: 230638352
Test: follow the reproduce step, see video
Change-Id: Ia4264a8cac2b34a2f7e9b85b35ebee7f74842aa8
2022-05-09 16:06:14 -07:00
James O'Leary
6ac128a25b Separate color into app color and dot color
Design intends for predicted app disc to use the app color, and the
dot to use tertiary T90/shade100. Both currently use `color`. Separating
into two separate colors lets use define the two separate colors
requested by design.

Bug: 213314628
Test: Manual inspection at runtime
Change-Id: I7f39b049896a3d5c4617beab67acd10777adae0a
2022-05-09 14:37:16 +00:00
Jerry Chang
56043e3d57 Merge "Consolidate animation to show divider bar" into tm-dev 2022-05-09 10:57:02 +00:00
Jerry Chang
010ce715e4 Consolidate animation to show divider bar
Add a fade-in animation for showing the divider bar. And make sure it
animates in-sync with task bar by deferring the fade-in animation until
keyguard dismissed.

When quickswitch or overview switch back to a split pair, the launch
split tasks remote animation will get onAnimationCancelled due to the
app transition was handled by recent animation controller. So leaves
divider bar fade-in animation to launcher when the remote animation got
cancelled.

Fix: 229613465
Fix: 208651526
Test: atest WMShellUnitTests
Test: launch a split pair and a fullscreen app, switch from overview or
      quickswitch back and forth between split pair and the fullscreen
      app. Observed divider bar animates in in-sync with task views.
Test: verified divider bar animates in-sync with task bar after keyguard
      dismissed.
Change-Id: I2f9064a089c446711545afda8204557a708545c5
2022-05-09 04:22:57 +00:00
Tracy Zhou
cf134e04c8 Merge "Rename navigationBarHeight to navigationBarFrameHeight" into tm-dev 2022-05-07 05:49:50 +00:00
Tracy Zhou
6cfc16157c Rename navigationBarHeight to navigationBarFrameHeight
This is used for surfaces

Bug: 200310506
Test: presubmit tests (since there is no behavior change)
Change-Id: I8c17777d14c1e8445ea426d9154580731b10632d
2022-05-06 19:47:58 +00:00
Arthur Hung
4bf81d5758 Merge "Fix back gesture send to wrong focus window" into tm-dev 2022-05-06 11:12:19 +00:00
Robert Horvath
86c660c7e8 Apply temporary PiP decor separately from overall placement
This change moves temporary decor handling out of the KeepClearAlgorithm
as it does not factor into keep clear area avoidance, and separating it
allows us to animate out the edu text without re-calculating the overall
PiP position. The PiP does not move immediately in response to keep
clear area changes, as it waits for the PiP position to stabilize - but
changes to temporary decor, such as edu text, should still be applied
immediately.

Bug: 226583836
Test: test TvPipBoundsControllerTest TvPipKeepClearAlgorithmTest
Change-Id: I49d32c18af13978a8a31b9a573273905fce934fd
2022-05-06 12:43:44 +02:00
Robert Horvath
5996d908e1 Debounce TV PiP movements
To prevent erratic movements of the TV PiP window, this change causes
changes to the PiP window position to be delayed by 300ms. Only if the
target position of the PiP stays uncontested for that time will the PiP
actually move there.

Bug: 226583836
Test: atest KeepClearRectsTests
Test: TvPipKeepClearAlgorithmTest TvPipBoundsControllerTest
Change-Id: I8e8736fc26b2382b8e540be82d335e0b00a3c62a
2022-05-06 12:43:42 +02:00
Jacqueline Bronger
b6de832709 Merge "Add more information to the TV PiP notification" into tm-dev 2022-05-06 10:39:27 +00:00
Arthur Hung
7d870f9ec2 Fix back gesture send to wrong focus window
Ensure we could get the proper focused window token what it's during
updating the focus if user touched down on another non-focused window.

It also called `startBackNavigation` when received first move that next
to down event to ensure the `WMS.onPointerDownOutsideFocus` could be
processed first.

Test: atest BackAnimationControllerTest BackNavigationControllerTests
Test: enabled split-screen, trigger back gesture on non-focused window
Bug: 230442550
Bug: 227724016
Change-Id: I81c4f02d43299c03f94dc295bb23ba80d46bded8
Merged-In: I81c4f02d43299c03f94dc295bb23ba80d46bded8
2022-05-06 03:11:40 +00:00
Jacqueline Bronger
3448bcdbfc Merge "Close the TV PiP menu when losing window focus." into tm-dev 2022-05-05 16:49:10 +00:00
Robert Horvath
7bea00698c Merge "Dismiss TV PiP when app op OP_PICTURE_IN_PICTURE is revoked" into tm-dev 2022-05-05 16:03:31 +00:00
TreeHugger Robot
55dd1c3792 Merge "Add accessibility action menu items for divider" into tm-dev 2022-05-05 10:54:21 +00:00
Jacqueline Bronger
5996319de6 Close the TV PiP menu when losing window focus.
Bug: 219885877
Test: manual - open a PiP, then long press HOME -> menu should close
Change-Id: I20b255f78e9e21a05a8138ef09ab00cce3f2521c
2022-05-05 10:43:55 +02:00
Mateusz Cicheński
3befbcf252 Revert "Move PiP when it occludes a keep clear area with naive a..."
Revert "Add the extra dependencies to ArcPipController."

Revert submission 17542127-keep_clear_areas

Reason for revert: Keep clear areas implementation is being moved to tm-qpr-dev, removing it from the tm-dev branch.

Test: n/a

Reverted Changes:
I3cbc46170:Move PiP when it occludes a keep clear area with n...
I15ac00f8e:Add the extra dependencies to ArcPipController.

Change-Id: Id7ca9259aaa2a133233d5249717ed5710349d9fc
2022-05-04 21:01:57 +00:00
Mady Mellor
e8ee9cd8d4 Merge changes Ieb77b211,Iad01b8f3,Ib9653ed3 into tm-dev
* changes:
  If something is suppressed from the notification list don't bubble it
  Tell NoMan to update the auto-expand flag
  Allow SysUI to update BubbleMetadata#FLAG_AUTO_EXPAND_BUBBLE
2022-05-04 18:00:21 +00:00
Jacqueline Bronger
c096f52c55 Add more information to the TV PiP notification
Includes general information as well as the system and app actions (or
media actions if there are no app actions)

Bug: 204173025
Bug: 199490119
Test: manual - check notification content from aosp notification listener

Change-Id: I6a15e443ad8f1fa17bd76e52c002909faa1c44db
2022-05-04 15:08:51 +02:00
Chilun Huang
45b0372fc5 Add accessibility action menu items for divider
Allows user to resize the screen via the menu items of the divider.

Bug: 204502843
Test: manual check the menu items
Test: atest WMShellUnitTests

Change-Id: Idc888b977e0e69c7d5c40f26a89f5af9ad5ad9cd
2022-05-04 03:16:07 +00:00
TreeHugger Robot
66688f0d8c Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-05-03 20:48:34 +00:00
Vinit Nayak
0567c3553a Merge "Revert "Revert "Remove check for preventing re-parenting non-spl..."" into tm-dev 2022-05-03 19:56:34 +00:00
TreeHugger Robot
fe8cf73739 Merge "Fix PipTaskOrganizerTest" into tm-dev 2022-05-03 18:37:57 +00:00
Vadim Caen
064b49a1a1 Merge "Add developer option for back animation DO NOT MERGE" into tm-dev 2022-05-03 14:13:57 +00:00
TreeHugger Robot
5cc20aa290 Merge "Follow up Androidx dynamic animation api change" into tm-dev 2022-05-02 19:30:44 +00:00
Hongwei Wang
3fbc6c9d0e Fix PipTaskOrganizerTest
Fix the regression from ag/17523158 that the PipParamsChangedForwarder
instance in unit test is null. Added also the check that
PipParamsChangedForwarder does dispatch the aspect ratio change.

Bug: 231134850
Test: atest WMShellUnitTests:PipTaskOrganizerTest
Change-Id: I1161646babaf974d7beca2889805672d68adf5bf
2022-05-02 11:35:21 -07:00
Sally
6fb258098c Follow up Androidx dynamic animation api change
Refactor codes using DynamicAnimation Animation handler api codes
    for following up Androidx codes changes.

Change needed to support AndroidX platform prebuilts, which include changes that fix a severe accessibility bug and setting.

Bug: 167382784
Bug: 221303983
Test: build
Change-Id: Ie75cc4068fa0b49816756650e900b7943f6c97d2
Merged-In: Iaa0e787675f53ac16cf61f2d2b6adae02ab55623
2022-05-02 17:34:16 +00:00
Vadim Caen
a73a4428ff Merge "Add background executor fow WmShell" into tm-dev 2022-05-02 17:02:59 +00:00
Vadim Caen
94f506aa2a Add developer option for back animation DO NOT MERGE
Bug: 228936326
Test: BackAnimationControllerTest#animationDisabledFromSettings
Change-Id: I857a480e7375cada9171712d737162c7876c087e
Merged-In: Ie7a3acc5674080a22ccdcd0fe31a158a30ee9040
2022-05-02 17:15:06 +02:00
Robert Horvath
48e24a8450 Dismiss TV PiP when app op OP_PICTURE_IN_PICTURE is revoked
Moves PipAppOpsListener out of the phone package.

Bug: 227313442
Test: m SystemUI CarSystemUI
Test: Manual on adt3
Change-Id: I39b153a03988accb91e0b41eae275e98e949594d
2022-05-02 14:41:04 +02:00
Vadim Caen
e6a1b4e8bc Add background executor fow WmShell
Add a low priority ShellExectuor for background task in WmShell

Test: N/A
Bug: 228936326
Change-Id: I10adafa03aca98a9080fd4ac1e8ba42fa9683914
2022-05-02 14:15:39 +02:00
Jacqueline Bronger
a512a9b955 Merge changes from topics "presubmit-am-5a31146ec7864d04ab14351725610831", "presubmit-am-bcec5630c20a4c7ca37a5694c6a3b126" into tm-dev
* changes:
  TV:Fade out PiP content during aspect ratio change
  Reorder PiP menu buttons.
  Improve TV PiP menu buttons
2022-05-02 08:41:46 +00:00
Jacqueline Bronger
936456aebc Merge "Handle PiP params changes in onTaskInfoChanged" into tm-dev 2022-05-02 08:35:59 +00:00
Bill Yi
5a2b084482 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I04503292b8ffb8fa95c71e2a60e5bf7053a5a522
2022-04-29 19:52:48 +00:00
Mady Mellor
d0ac45a71f If something is suppressed from the notification list don't bubble it
Also set it to not auto-expand since it's unexpected to have bubbles
expand when DND turns off.

Test: BubblesTest NewNotifPipelineBubblesTest
Bug: 226316876
Change-Id: Ieb77b211f2b11fea83a2ff6e34e6f31b0f96919e
2022-04-29 17:26:35 +00:00
Mady Mellor
e4d1834578 Tell NoMan to update the auto-expand flag
Bug: 226316876
Test: atest BubblesTest NewNotifPipelineBubblesTest
Change-Id: Iad01b8f35d3481ab0bf080e6319ea9452e9f628d
2022-04-29 17:26:30 +00:00
Mady Mellor
40422db463 Allow SysUI to update BubbleMetadata#FLAG_AUTO_EXPAND_BUBBLE
This flag should only really be applied to a notification bubble
one time. Once the bubble has auto-expanded (or if it was posted and
unable to auto-expand at that time due to something like DND), the
flag should be removed so we don't auto-expand it again.

We have a method that allows us to modify some specific flags on
BubbleMetadata. This CL updates that method to be more general and
work with any of the BubbleMetadata flags.

Bug: 226316876
Test: atest NotificationManagerServiceTest
Change-Id: Ib9653ed304f13ac88f489146d503f4de4fa29421
2022-04-29 17:25:30 +00:00
Leon Scroggins
866f67dc94 Merge "Propagate HDR information to screenshot animation." into tm-dev 2022-04-29 15:16:21 +00:00