Commit Graph

1230 Commits

Author SHA1 Message Date
Nicolò Mazzucato
4b6d20e55b Merge "Register hinge angle sensor listener in a background thread" into tm-dev 2022-03-04 18:18:55 +00:00
Nicolo' Mazzucato
89e5aa5900 Register hinge angle sensor listener in a background thread
This was taking ~13ms on the ui thread.

I had to move up the sysui background executor as it was only provided inside sysui dagger component, but those classes are also used in WM component.

Bug: 221394115
Test: Folding device and check animation
Change-Id: I766d879d68f555214f9c1d2434cfab732937cd32
2022-03-04 13:50:53 +01:00
Wei Sheng Shih
a8b20748f3 Merge "Cancel recents animation when touch home key" into tm-dev 2022-03-04 08:40:42 +00:00
Ady Abraham
4700294c96 Merge "Remove getSfInstance from InputConsumerController" into tm-dev 2022-02-28 17:30:41 +00:00
Tony Huang
e4590dbf5d Merge "Clean up the legacy split screen (7/n)" into tm-dev 2022-02-25 07:29:40 +00:00
Evan Rosky
0ef57a2152 Merge "Support restoring the original task ordering of transient-launches" into tm-dev 2022-02-25 03:47:37 +00:00
Winson Chung
535740f798 1/ Remove some unused code from the shared lib
Bug: 219861883
Test: Builds/Presubmit
Change-Id: I884392d2fcbfac6fd27c01f0077d4fb426a24d4a
2022-02-24 18:04:02 +00:00
TreeHugger Robot
b63a699489 Merge "Add traces to aid onScreenTurnedOn latency debugging" into tm-dev 2022-02-24 17:05:05 +00:00
Nicolo' Mazzucato
edf45dd5f1 Add traces to aid onScreenTurnedOn latency debugging
+ Adding traces to HingeSensorAngle provider (it seems it takes >10ms to initialize on the ui thread)
+  Adding traces to Keyguard display manager: show and hide presentation together account for 130ms, and should definitely be improved
+ Removed PowerManager import as style checks complained

Bug: 197515205
Test: recorded a perfetto trace and made sure those are there
Change-Id: I38def9d0503638a4647e097c9c5974660e0f8cd0
2022-02-24 15:00:41 +01:00
Ady Abraham
bbf0c85269 Remove getSfInstance from InputConsumerController
It is dead code, not used anywhere.

Test: build
Bug: 162235855
Change-Id: I857c6f7a2e4577f51434ffd9a215238b5ff4ddb3
2022-02-23 18:08:32 -08:00
Dave Mankoff
4ed3ca29a1 Merge "Add support for SystemProperty flags to SysUI." into tm-dev 2022-02-23 22:20:48 +00:00
Evan Rosky
3c8a920a91 Support restoring the original task ordering of transient-launches
Like legacy recents, we need to be able to restore the home task
back to where it was in the task-ordering when recents doesn't
actually switch to home.

This CL records the "restore-below" task during activity-start
and stores in the associated transition. There is a new WCT op
that will "restore" a container back to where it was.

Bug: 210014802
Test: launch a task chain (task followed by task), then go to
      recents, then restore the top task. observe task order
      remains as it was before recents.
Change-Id: I9f9da7d35ffe69099e6431b7a0d5a527e33c5a74
2022-02-23 19:55:43 +00:00
wilsonshih
d275b6b520 Cancel recents animation when touch home key
There should send an opening task transition to remote transition
handler to finish the recents animation. For now there is no opening
transition send to Shell because the exist home activity won't be
collected while start home activity.

Bug: 207297486
Test: 1. Enable shell transition.
      2. Setup 3rd-party launcher as default home.
      3. Entering Recents from home.
      4. "adb shell input keyevent KEYCODE_HOME", verify recents
	 animation will be dismissed.
Test: atest NexusLauncherTests:com.android.quickstep.FallbackRecentsTest
Change-Id: Ib3b897d97e3fdee3131556d2810b49d434e0e70a
2022-02-23 16:12:21 +08:00
Tony Huang
24d1c2e002 Clean up the legacy split screen (7/n)
Clean up using of legacy split on SysUi.

Bug: 199236198
Test: pass existing tests.
Change-Id: I199dafc836d3ba7bc5db1740658247397523c200
2022-02-23 15:46:06 +08:00
Dave Mankoff
7277cee4c5 Add support for SystemProperty flags to SysUI.
This will allow the flag flippin' app to change boolean system
properties that launcher, settings, and system server can read.
Some of these flags are already being read between the various systems
and this gives a unified ux for changing the flags.

Bug: 219067621
Test: manual
Change-Id: I7d1a1e758915f43cac114054a2c2e055706ef3f3
2022-02-22 17:22:00 -05:00
Jordan Demeulenaere
caa4ecedcb Enable back gesture when a SysUI dialog is showing (1/2)
This CL ensures that back gesture is not disabled when a SysUI dialog is
shown, so that the dialog can be closed by swiping back or swiping home.

Test: Manual
Bug: 210270549
Change-Id: Id7d597105b3a44ca20c5aef42dd0a7318e5d91b7
2022-02-22 11:08:05 +01:00
Caitlin Cassidy
ba6b756d0e [Nearby Media Devices] Add a SystemApi to get information about nearby
media devices from external clients.

Bug: 216313420
Test: CTS included in same topic
Test: atest NearbyMediaDevicesManagerTest
Change-Id: Ic5f26d3048a3475dbd232c913bb00bee46339b0a
2022-02-11 20:59:43 +00:00
Jerry Chang
f1745c13a7 Merge "Fix Launcher being occluded during rotate transition" 2022-02-09 03:28:21 +00:00
TreeHugger Robot
10e2560cba Merge "Have both NAVIGATION_HINT_IME{,_SWITCHER}_SHOWN" 2022-02-05 02:48:09 +00:00
Yohei Yukawa
bf122b9f94 Have both NAVIGATION_HINT_IME{,_SWITCHER}_SHOWN
This is a mechanical renaming CL with no behavior change.

Somehow NAVIGATION_HINT_IME_SHOWN was set when the IME switcher needs
to be shown, not when the IME is shown.  This CL aims to avoid future
confusions by also introducing

  NAVIGATION_HINT_IME_SWITCHER_SHOWN

then setting NAVIGATION_HINT_IME_SHOWN when the IME is actually shown.

This CL also updates NavigationBarTest to verify those flags.

Bug: 192412909
Bug: 217755059
Test: atest SystemUITests:NavigationBarTest
Change-Id: I8bdd58d040689953072c7f384ece2bca677265e1
2022-02-04 12:49:21 -08:00
Shan Huang
445c5f24a2 Expose IBackAnimation from Shell to Launcher.
Test: m -j
Bug: b/195946584
Change-Id: I26f48e78c91ef99757da9bc09d4a4f98dc50f863
2022-02-04 18:50:38 +00:00
Caitlin Cassidy
44386a5a2e [Media TTT] Add @SystemApis for all the media transfer callbacks.
This migrates the media transfer from just a service to a full-fledged
@SystemApi. Some of the testing infrastructure has not yet been migrated
to keep this CL slightly smaller.

Bug: 216318437
Test: systemui media.taptotransfer tests *still need to be updated*
Change-Id: Idf1f72de1343020668e158d74051c1dfb970cfcd
2022-02-02 16:14:33 +00:00
Caitlin Cassidy
8333b4f42f Merge "[Output Switcher] Implement nearby device callbacks." 2022-02-02 14:37:20 +00:00
TreeHugger Robot
fc3e8ba58a Merge "Apply alpha to status bar during unfold" 2022-02-02 03:47:54 +00:00
Caitlin Cassidy
3594077b18 [Output Switcher] Implement nearby device callbacks.
Bug: 216313420
Test: atest NearbyMediaDevicesServiceTest
Change-Id: I7014df50afef1e845a6c8a62e6b3ef29cc7197a8
2022-02-01 16:58:17 +00:00
Nicolo' Mazzucato
8188445d32 Apply alpha to status bar during unfold
Status bar icons are displayed only in the last 25% of the unfold progress. Otherwise, during unfold to app scenario, they were going outside the app window.

+ Minor kotlin fixes.

Test: Unfold while app opened
Bug: 210997078
Change-Id: I26ab9cb28ce4d894ad33b6b26e11ae59e28234bd
2022-02-01 16:57:34 +01:00
Nicolo' Mazzucato
4b40d32ae4 Animate notification shade during unfold
Adds some constant translation to elements of the notification shade during fold/unfold. This is only applied when the device is in natural rotation.

KeyguardUnfoldTransition was doing the same: the logic has been extracted in UnfoldConstantTranslateAnimator, that is now used by both classes.
KeyguardUnfoldTransition's tests related to the animator have been moved to UnfoldConstantTranslateAnimatorTest.kt.

+ Minor formatting issues fixed (using ktfmt)

Bug: 201411030
Test: atest UnfoldConstantTranslateAnimatorTest KeyguardUnfoldTransitionTest + Tested manually on lockscreen and notification shade
Change-Id: Ic8d4cf5d7b2a9f8fc366842623c87c15cf79766f
2022-01-31 19:22:27 +01:00
Bryce Lee
f57d17639a Remove CommunalSource related AIDL interfaces.
This changelist removes the CommunalSource AIDL interfaces that are no longer used.

Bug: 216515830
Test: manual
Change-Id: I82f96e1b30da7eb46145e46cbe629135cc342c8e
2022-01-30 12:37:50 -08:00
Pat Manning
c9327bc2da Merge "Track immersive mode via a new SysUI state." 2022-01-28 10:24:07 +00:00
Jerry Chang
3bcc395074 Fix Launcher being occluded during rotate transition
I1177b1ef removed independent checks and reparent all transition-leashes
to root leash. Which result to wrong z-order setup during rotation
transition because it also reparents task display area transition-leash
to root leash.

This brings back independent change checks and overrides root task
targets with corresponding child task info. This is needed because
Launcher monitors leaf task id to perform recent apps transition.
Otherwise child task targets might get transformed twice with the flow
like RecentsView#redrawLiveTile.

Bug: 206487881
Test: close landscape app to portrait home, observed Launcher stays on
      top of wallpaper during transition.
Test: swipe up split pair to recent apps panel transformes thumbnail
      pair properly.

Change-Id: I234e329c40938cec7e35a62dc51d00cdf2e84b0b
2022-01-27 16:34:04 +00:00
Wei Sheng Shih
85b897d6f3 Merge "Fixes opening task from Recents can be hidden." 2022-01-25 03:45:17 +00:00
Josh Tsuji
675a220925 Merge "Adds Launcher in-window animations, and reworks how the unlock flow works." 2022-01-24 20:34:44 +00:00
Caitlin Cassidy
dbd0419bab Merge changes Iceea7c10,Iba98b916,I912caa44,Id5aef5c4,Iddc05936, ...
* changes:
  [Media TTT] Add NoLongerCloseToReceiver callback.
  [Media TTT] Add TransferToThisDeviceSucceeded callback.
  [Media TTT] Add an undo callback to the interface for when a transfer has succeeded. The callback will be invoked when the user presses the undo button.
  [Media TTT] Add the #transferToReceiverSucceeded callback.
  [Media TTT] Add transferToThisDeviceTriggered callback.
  [Media TTT] Update chip states to not require otherDeviceName if they don't need it. Define a #getChipTextString method instead.
2022-01-24 20:04:34 +00:00
TreeHugger Robot
cbfc6f5891 Merge changes Ibb968d5c,I38521e9a
* changes:
  [Media TTT] Add the #transferToReceiverTriggered callback.
  [Media TTT] Don't use futures for determining whether a transfer has succeeded or not.
2022-01-24 19:36:40 +00:00
TreeHugger Robot
c11852d456 Merge changes Ic4074394,I1be9f1ab
* changes:
  [Media TTT] Add error state.
  [Media TTT] Add the #closeToReceiverToEndCast callback.
2022-01-24 19:36:24 +00:00
Pat Manning
0a45cccbc1 Track immersive mode via a new SysUI state.
Test: manual
Bug: 203748818
Change-Id: Iae29044fd1962391a6bd0390dcb7870ced2b3efb
2022-01-24 18:06:00 +00:00
TreeHugger Robot
0e4308a36c Merge "Add log dumps for taskbar" 2022-01-21 15:05:32 +00:00
Wei Sheng Shih
e399817f9d Merge "Shift Recents task to top when opening Recents." 2022-01-21 10:11:57 +00:00
Wei Sheng Shih
d84239bd7a Merge "Let TransitionHandler to clear the transition-leash" 2022-01-21 09:34:02 +00:00
Caitlin Cassidy
180e9686d6 [Media TTT] Add NoLongerCloseToReceiver callback.
Bug: 203800643
Bug: 203800347
Test: verify `adb shell cmd statusbar media-ttt-chip-sender Device
NoLongerCloseToReceiver` hides the chip
Test: media.taptotransfer tests

Change-Id: Iceea7c10b23dc1b175e11335ca4fcf695ca98fb6
2022-01-21 00:24:08 +00:00
Caitlin Cassidy
ca400ac4a9 [Media TTT] Add TransferToThisDeviceSucceeded callback.
Bug: 203800643
Bug: 203800347
Test: verify `adb shell cmd statusbar media-ttt-chip-add-sender Device
TransferToThisDeviceSucceeded` shows the chip
Test: media.taptotransfer tests

Change-Id: Iba98b91617e25126e03c99d03e0a628994e6516a
2022-01-20 23:43:33 +00:00
Schneider Victor-tulias
8ef85375cd Add log dumps for taskbar
Test: created bugreport and checked logs
Bug: -
Change-Id: I45f28aa27dfccab016ebbd96b5dc189af5444b09
2022-01-20 10:43:28 -08:00
Nicolò Mazzucato
e0e9d4ef49 Merge "Reformat unfold lib with ktfmt" 2022-01-20 13:18:30 +00:00
wilsonshih
afad4c7fc5 Fixes opening task from Recents can be hidden.
The opening task from Recents can be invisible because there would hide
the created leash, which should be unnecessary since the recents window
animator would handle the cross fade animation.

Test: Enable shell transition, enter recents, swipe to right-most page(
the page shows "Clear all"), then click the task and verify the task
won't become invisible during animation. Test on both NexusLauncher and
3rd-party Launcher.
Test: atest FlickerTests:OpenAppFromOverviewTest
Test: atest TaplTestsQuickstep

Change-Id: I0f7b7855de944c744190f6599ed48490f6e0d9f0
2022-01-20 16:14:18 +08:00
wilsonshih
028954b0b1 Let TransitionHandler to clear the transition-leash
Send the remove transition-leash transaction back to the transition
handler, so it can be applied with finishTransaction together, in
case the task surface suddenly disappears due to no parents.

Bug: 213867585
Bug: 214352241
Test: atest WMShellFlickerTests:QuickSwitchBetweenTwoAppsForwardTest
Test: atest WMShellFlickerTests:MovePipDownShelfHeightChangeTest
Change-Id: I5fca942c92d7175dc2f08c3f14f4da464405709c
2022-01-20 14:55:19 +08:00
wilsonshih
798075a566 Shift Recents task to top when opening Recents.
Unlike usual opening/closing app transition, the Recents task should
above Home task when opening recents, otherwise the home task would
above the recents task so it will seems like the home been add into
recents animation.

Bug: 207297486
Test: enable shell transition, setup 3rd-party launcher as default
home. Entering recents at home page and verify the home task won't
stay on top.

Change-Id: I9bac97cb79febf112ec9ac1bdbe3de205604b01d
2022-01-20 06:54:06 +00:00
Merissa Tan
f689c8dfef Merge "Create new DesktopNavbarButtonsViewController class." 2022-01-19 19:22:49 +00:00
Jerry Chang
1b7cf5a207 Merge "Consolidate recent animation in split screen with shell-transition" 2022-01-19 01:45:56 +00:00
Merissa Tan
2d6fce65c2 Create new DesktopNavbarButtonsViewController class.
This CL creates a new DesktopNavbarButtonsViewController class to allow
for taskbar buttons and status icons customization on desktop
environment.

Recall: http://recall/clips/1f3b88e2-9f4e-4291-a9fe-a17641d1fd0c

Bug: 213964564
Bug: 196757951
Test: Switch between different system navigation modes and verify the
desktop taskbar buttons/status icons stay on screen, and are functional.

Change-Id: I05846b61689213ded88b8f49460aced88e49fd65
2022-01-18 17:06:48 -08: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