Commit Graph

6636 Commits

Author SHA1 Message Date
Vinit Nayak 0b73d1014f Hide overview and app icon split option when appropriate
Don't show app menu icon split option or overview
action split option when current taskView is already in
split or there are not at least 2 tasks with which to
invoke split

Fixes: 197245395
Test: Tested with small and large screen,
dismissing tasks in overview, with and without
GroupedTaskView as main running task

Change-Id: I90cc3c39e4d94662cb87314a210d45d145b6e026
2021-08-31 20:23:36 -07:00
TreeHugger Robot 667bda8448 Merge "Revert "Revert "Migrating all model tests to Instrumentation tests""" into sc-v2-dev 2021-08-31 10:52:02 +00:00
Sunny Goyal 777d49062f Revert "Revert "Migrating all model tests to Instrumentation tests""
This reverts commit 7a4a30d86d.

Test: Presubmit
Reason for revert: Fixing original bug

Bug: 196825541
Change-Id: Id4b1eb24a89564d264266d305aebea52917dfcd9
2021-08-31 10:51:52 +00:00
TreeHugger Robot 438f796626 Merge "Launch multiple tasks at once" into sc-v2-dev 2021-08-30 21:18:28 +00:00
Lucas Dupin 512f95131c Merge "Dispatch blur radius for BACKGROUND_APP state" into sc-v2-dev 2021-08-30 20:33:57 +00:00
Vinit Nayak dd85a9c0a6 Launch multiple tasks at once
Bug: 195675206

Change-Id: I31c76e8dfec617092f73e989ce94bf0ab693d0d1
2021-08-30 19:24:43 +00:00
TreeHugger Robot aa28886d7b Merge "Fix back button not touchable in SUW" into sc-v2-dev 2021-08-30 17:55:11 +00:00
Vadim Caen 9a2f9f7dab Merge "Disable splash screen for launches from widget." into sc-dev am: 97aaa6e5ae am: 84ec20af98
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15685202

Change-Id: Iaf93cd6b0f1fceba14c74264e2cc346d0cd03f03
2021-08-30 16:47:59 +00:00
Vadim Caen 84ec20af98 Merge "Disable splash screen for launches from widget." into sc-dev am: 97aaa6e5ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15685202

Change-Id: Ie2fcf73aaa402706eb369f41c0326c3d641974d5
2021-08-30 16:37:31 +00:00
Tony Wickham 906def495f Fix back button not touchable in SUW
Since NavbarButtonsViewController already checks visibility of buttons before adding them to the touchableRegion, we can remove teh isThreeButton() check.

Test: run adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity, then press back button and ensure it gives visual feedback (even though there's no page to go back to in this test activity).
Bug: 191846922
Change-Id: I10d3d046cd2d14017638a2c71ea6b9fe228fadfc
2021-08-30 09:23:01 -07:00
Vadim Caen 97aaa6e5ae Merge "Disable splash screen for launches from widget." into sc-dev 2021-08-30 15:56:26 +00:00
TreeHugger Robot 2d748d92e2 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-08-28 07:46:53 +00:00
TreeHugger Robot 4a5d3f39fa Merge "Code cleanup from rebase" into sc-v2-dev 2021-08-28 00:57:22 +00:00
Vinit Nayak cdcaf7a2ed Code cleanup from rebase
Bug: 195423591
Change-Id: I623d6ef46458a282e3c63cde0bdc457cb38e4d50
2021-08-27 16:28:12 -07:00
Vinit Nayak 5025ecb8b6 Merge "Add GroupedTaskView to recents view only if needed" into sc-v2-dev 2021-08-27 22:13:20 +00:00
TreeHugger Robot 50c19490df Merge "Revert^3 "Enable input window rotation flag"" into sc-v2-dev 2021-08-27 20:46:59 +00:00
Vadim Tryshev 773309717d Revert^3 "Enable input window rotation flag"
4fbd2f2252

Reason for revert: b/197866364
Bug: 197866364

Change-Id: I6b9be180c54ddb4999236a460c5ef4877fab535b
2021-08-27 20:46:45 +00:00
Vinit Nayak e6d896f1bd Add GroupedTaskView to recents view only if needed
Fixes: 197712963
Test: Got into the state of the exception once, but
didn't seem to repro after change.

Change-Id: Ifebf198ba0d1d0cca83935a700711fb22a8a276a
2021-08-27 12:59:26 -07:00
Lucas Dupin 937eff0e76 Dispatch blur radius for BACKGROUND_APP state
When entering BACKGROUND_APP, it's possible that the blur radius will be
lost. We need to dispatch it on the first possible frame, otherwise
Overview won't have blurs.

Fixes: 196828055
Test: enter overview multiple times
Test: pull up all apps
Test: open app from home or all apps
Change-Id: I5920e1b28e2d23421863ecd59845e902040d126c
2021-08-27 18:10:41 +00:00
Vadim Caen ee44c4dc1e Disable splash screen for launches from widget.
The transition from a widget to the splash screen icon feels
odd because of the difference in shapes. Disable for S and rework that
in T.

Test: Manually tested with clock and Calendar
Bug: 197504657
Change-Id: Ia375885af967d6ad282dcc7325ad905731c8734d
2021-08-27 19:17:03 +02:00
TreeHugger Robot 64a826fa16 Merge "Do not reload launcher when changing active display" into sc-v2-dev 2021-08-27 15:50:56 +00:00
Bill Yi e874865f44 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I40a0f348c0aab7103e1f16fdb5afdf7047f458e3
2021-08-27 05:38:10 +00:00
Bill Yi 268fed7bcc Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I432b16f415344cedf760195ccdc303909c67724b
2021-08-27 05:37:36 +00:00
Bill Yi 155a13de9f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib8df9d449d6109c352a2e537cd425c716e2f017c
2021-08-27 05:37:03 +00:00
Android Build Prod User 64af7acc1d Merge "Show back button in SUW" into sc-v2-dev 2021-08-27 04:20:51 +00:00
Android Build Prod User 0664dbdab9 Merge "Don't avoid blurring overview" into sc-v2-dev 2021-08-27 01:09:46 +00:00
Tony Wickham 14cba5e009 Show back button in SUW
- Listen for USER_SETUP_COMPLETE
- Recreate taskbar, forcing nav buttons to be visible

Test: Run setup wizard and ensure back button is present, then is replaced with taskbar when setup is complete
adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity

Fixes: 191846922
Change-Id: I789186dcc23a2db7cc4637b1cb0486f0d2add784
2021-08-26 17:34:54 -07:00
Android Build Prod User da403a97aa Merge "Updates Taskbar Edu steps." into sc-v2-dev 2021-08-27 00:03:47 +00:00
Sunny Goyal 6e6f79933e Do not reload launcher when changing active display
> Updating IDP to use fixed bitmap sizes, so that the cache
  stays valid
> Caching last known windowMetrices for non-active displays and
  using estimation only when the cache is not available
> Only reloading model if IDP change could have affected the model
> Remove unnecessary listeners from IDP which are already controlled by
  model lifecycle

Bug: 191657065
Test: Manual
Change-Id: Ia8e6dfafd0977e62aa3fcf367ad79f7a49b2df51
2021-08-26 15:55:21 -07:00
Lucas Dupin b4f899fd9a Don't avoid blurring overview
The app window is now on top of the scrims, so we can just mark the
window as opaque and keep blurring.

Bug: 196828055
Test: atest OutputUpdateAndWriteCompositionStateTest
Test: systrace on all app, and overview
Change-Id: I128d3b4722060c0bb72a218bf01ba26dabaddacf
2021-08-26 22:30:34 +00:00
Alex Chau 036dee9251 Styling changes for ClearAllButton
- The new style is a Widget.DeviceDefault.Button with tweaked corner radius, min size and color
- Light: http://screen/4aTR7DKuhADn2Z6
- Dark: http://screen/68XkvaAqRivbDw8

Bug: 194194694
Bug: 197887431
Test: manual
Change-Id: I1e0f2217a424a244d729c1f952035615ba045d5a
2021-08-26 23:27:42 +01:00
Android Build Prod User 2d5a8dc847 Merge changes Ib2bc8419,Ia41cb0e3,I43bfbc41 into sc-v2-dev
* changes:
  Animate PredictedAppIcon when its icon changes
  Add "wave" animation when entering taskbar edu
  Add slot machine animation for PredictedAppIcon
2021-08-26 21:48:07 +00:00
Andy Wickham f9ea9ce1cd Updates Taskbar Edu steps.
They are now:

1. Switch apps
2. Splitscreen
3. Docking

They all use the same (blank) placeholder image.

Bug: 180605356
Test: Manual

Change-Id: I53b3f71519c50a1d93f800490d3127e4d669e068
2021-08-26 10:22:20 -10:00
Android Build Prod User b862d2c30f Merge "Add Split button in OverviewActions" into sc-v2-dev 2021-08-26 20:21:08 +00:00
Tony Wickham 8b07b8f6d0 Merge "Hide taskbar icons when recents button is disabled" into sc-v2-dev 2021-08-26 20:10:39 +00:00
Tony Wickham 175d152f76 Animate PredictedAppIcon when its icon changes
Reuses the slot machine animation to slide in the new icon. Additionally, staggers based on other icons changing before it.

Test: open apps, watch predictions change
Bug: 197780290
Change-Id: Ib2bc84193a9e350c915dd3486b6c98c6c88d3f83
2021-08-26 13:00:51 -07:00
Tony Wickham 31f787d352 Add "wave" animation when entering taskbar edu
Each icon scales and translates up, then back down. If the icon is predicted, it also plays a "slot machine" animation through random icons from AllAppsList.

Test: Visual
Bug: 180605356
Change-Id: Ia41cb0e340347eea6b580d23c8a2386837e9c399
2021-08-26 13:00:43 -07:00
Tony Wickham 8e0484bf69 Add slot machine animation for PredictedAppIcon
PredictedAppIcon has the ability to create a "slot machine" animation which cycles through given icons and settles back on the original icon.

Currently the animation isn't used, but here's how you could start it:
if (view instanceof PredictedAppIcon) {
    List<BitmapInfo> randomIcons =
            mLauncher.getAppsView().getAppsStore().getApps()
            .stream()
            .map(appInfo -> appInfo.bitmap)
            .sorted(Utilities.getRandomComparator())
            .limit(3)
            .collect(Collectors.toList());
    ((PredictedAppIcon) view).createSlotMachineAnim(randomIcons)
            .setDuration(1000).start();
}

Test: Played the animation locally
Bug: 180605356
Change-Id: I43bfbc41256fb99ee9df3732fd493e6b96bde7cb
2021-08-26 12:10:47 -07:00
Vinit Nayak 6174106f68 Add Split button in OverviewActions
Shows up only for large screen devices, not phones.
Tested for NexusLauncher, general 3P launcher support
needed for staged split (TODO b/195607777)

Bug: 195423591
Change-Id: I4d455769b17637174b590c640516b9fbb6352c3d
2021-08-26 11:49:38 -07:00
Tony Wickham ee3814de1a Merge "Fix taskbar folder leave-behind not being drawn" into sc-v2-dev 2021-08-26 17:39:07 +00:00
Tony Wickham 3feebeb196 Fix taskbar folder leave-behind not being drawn
I guess FrameLayout has willNotDraw=true by default, so we need to set it to false in order to get onDraw().

Test: open a folder on taskbar
Bug: 197866264
Change-Id: Ia521bc3da28527b9c3f1fa7bcdaf5d9ffb7feccf
2021-08-26 17:38:53 +00:00
Tony Wickham bc30e25cec Hide taskbar icons when recents button is disabled
The idea is that both taskbar icons and recents navigate you to new apps, which we'd want to disable in similar contexts. Hence reusing FLAG_DISABLE_RECENTS.

Test: locally set FLAG_DISABLE_RECENTS=true, ensure taskbar icons don't show up (both in 3 button mode and gesture nav)
Bug: 193183428
Bug: 194990283
Change-Id: I9537f57dc25663151b1414c5260dadb58506fdb0
2021-08-26 10:18:04 -07:00
Alex Chau da7fe8ced1 Merge "More more logging for for Nexus home activity appearing after to-home gesture in L3" into sc-v2-dev 2021-08-26 10:57:52 +00:00
Vinit Nayak 759e15fe45 Merge "Null out RemoteTargetHandles as soon as finishing recents is requested" into sc-v2-dev 2021-08-26 05:54:46 +00:00
vadimt 1a79f87004 More more logging for for Nexus home activity appearing after to-home gesture in L3
Bug: 192018189
Test: presubmit
Change-Id: Id99dbf9469c61f81643e5182d17012b508cfce1e
2021-08-25 20:12:56 -07:00
Vinit Nayak f1aa726e9f Merge "Fix public variables to not have 'm' prefix" into sc-v2-dev 2021-08-26 00:07:45 +00:00
Android Build Prod User 14a7d63c23 Merge changes I54e39cc5,Iec62abae into sc-v2-dev
* changes:
  Set thumbnails for GroupedTaskView based on split layout bounds
  Implement swipe gesture for staged split in landscape
2021-08-25 20:30:43 +00:00
Android Build Prod User 9b2ec7d2d2 Merge "Revert^2 "Enable input window rotation flag"" into sc-v2-dev 2021-08-25 20:11:15 +00:00
Vinit Nayak aa11976cc5 Fix public variables to not have 'm' prefix
Bug: 181704764
Change-Id: I89e43ce6cc74119514c8124e7cc61b11dc475f58
2021-08-25 11:59:43 -07:00
Vinit Nayak c35507dc29 Set thumbnails for GroupedTaskView based on split layout bounds
Bug: 181704764
Test: Go to stage split in landscape w/
home rotation on/off, swipe up.
Thumbnails aren't perfectly overlaid, polish needed

Change-Id: I54e39cc5a18f527e80a664d60aca72dfd706ebdc
2021-08-25 11:59:00 -07:00