156 Commits

Author SHA1 Message Date
MrSluffy
cc8f9828ab Merge branch 'heads/android-14.0.0_r18' into 14-dev 2023-12-16 17:18:13 +08:00
MrSluffy
32700b0100 Merge branch 'android14-release' into 14-dev 2023-12-13 18:47:55 +08:00
Sunny Goyal
2003c1c73f Restarting launcher if a flag changes
> Only restart when the screen is off.
> This allows better propogation of flags similar to systemUI
> Adding support for integer flags

Bug: 266854800
Test: Verified on device using device_config shell command
Change-Id: I4ea9c564f2d973f11f9570b5a21365183afefab7
2023-02-28 12:01:22 -08:00
Sunny Goyal
98204add71 Moving flag creation to a separate file
> This provides better control over proguarding descriptions
> Enforcing bug number in flag creation

Bug: 270386012
Test: Presubmit and verified on device
Change-Id: I31014e397690379024d2e42c0e913ce806b9569c
Merged-In: I31014e397690379024d2e42c0e913ce806b9569c
2023-02-28 18:05:42 +00:00
Sihua Ma
04c89fe38e Merge "Add QuickstepWidgetHolder for widget handling" into tm-qpr-dev 2022-12-19 18:22:38 +00:00
Sihua Ma
1db8bc2467 Add QuickstepWidgetHolder for widget handling
Fix: 235358918
Test: Manual
1. Rebooted the device and verified that widgets are still updating properly
2. Changed the theme from dark to daylight, then from daylight back to dark and verified that widgets are working
3. Kept the device on for several days and verified that widgets are still updating
4. Turn on auto-rotate for the launcher, open any app then exit, verified that widgets will not vanish and reappear
5. Add & remove widgets from the screen, added widgets are still updating

Change-Id: I98ee902f7d16b47bd77626201a4fefc897ba17a0
2022-12-16 11:56:36 -08:00
Sunny Goyal
54fa110bba Removing some unnecessary interfaces and merging them to ActivityContext
Bug: 259733681
Test: Everything compiles
Change-Id: If6b530f6e589a851cf8554f5de0849843bd66dd4
2022-12-08 10:15:55 -08:00
Sihua Ma
8bbfcb6581 Move LauncherWidgetHolder to widget package
Making LauncherAppWidgetHost package-private as well

Bug: 235358918
Test: N/A
Change-Id: If022ec8d429579a972991872b2dc11db76719341
2022-11-16 14:31:14 -08:00
Sihua Ma
aa2b872d1c Move most of the functions in LauncherAppWidgetHost to LauncherWidgetHolder
Test: N/A
Bug: 235358918
Change-Id: I343419376491203a195154f2766b12e5def38879
2022-11-16 14:30:08 -08:00
Sihua Ma
8ca56fe1cd Get rid of setInteractionHandler call to the host in launcher
Bug: 235358918
Test: N/A
Change-Id: I0defac1831825bf0a13a601dd1502b4ca022bc2e
2022-10-24 14:56:11 -07:00
Alex Chau
3d2c062567 Change wallpaper depth in widget picker
- Also changed widget picker open/close duration, refactored the values into DeviceProfile
- Generalized MultiAdditivePropertyFactory to accept aggregator as parameter

Bug: 240580498
Test: manual
Change-Id: I6886ca514593e404b8d7b0e8ed44f20ec2b77c73
2022-09-13 12:20:56 +08:00
Alex Chau
3193522616 Change wallpaper depth value in AllApps bottomsheet
- Cap AllApps wallpaper zoom to workspaceContentScale rather than all the way to max depth (config_wallpaperMaxScale)
- Changed both workspace scale and depth interpolator to correlate with AllApps threshold

Bug: 240580498
Test: manual
Change-Id: I0342a37c72206268dcffc5697a212704a41b020f
2022-09-01 21:26:30 +01:00
Vinit Nayak
c7293179d0 Space out 3 button nav on taskbar
* Add additional margin on nav buttons if
there's overlap w/ contextual button
* End spacing is dependent on grid layout

Bug: 223724516
Test: Tested on unfolded with different
grid sizes.

Change-Id: Ie814f35cd1f35629744050ee3f7242c5a8599883
2022-07-25 13:15:11 -07:00
Luca Zuccarini
ea948c2b33 Update the NORMAL<->ALL_APPS swipe transitions on phones.
Bug: 144877924
Test: manual
Change-Id: I47d4cdedea69b921711c33e2905bc429e7d1db35
2022-05-13 19:09:17 +00:00
Luca Zuccarini
ef006c7603 Update the NORMAL->ALL_APPS transition when tapping on QSB on phones.
- New interpolators
- New duration
- Removed workspace translation
- Removed overlapping fades -- are now sequential

See video in the bug.

Bug: 227745955
Test: manual
Change-Id: I19fa19a3806e963a04c5e694a52d3c1b921cf51f
2022-05-06 16:07:17 +00:00
Alex Chau
a717d1621d Allow BaseState.getTransitionDuration to read DeviceProfile
- Changed handheld duration to AllApps to 600

Bug: 227745955
Test: manual
Change-Id: I6f6642440dda3e39947231c2d38e8b60d152e08f
2022-05-05 14:44:00 +01:00
Alex Chau
f39cc126bf Tune AllApps dismiss animation
- Avoid overriding interpolator in AllAppsTransitionController.setStateWithAnimation as it's no longer needed and it'll wrongly override interpolator for ANIM_ALL_APPS_FADE
- Override ANIM_ALL_APPS_FADE to FINAL_FRAME in QuickstepAtomicAnimationFactory for tap deadzone to dismiss animation, also added EMPHASIZED_ACCELERATE for the dismiss animation
- Tuned dismiss animation across form factors to 300ms

Fix: 220336617
Test: manual
Change-Id: I4b3e827b503dcb1dd39f0bd99d4c1dd5ffdba0f3
2022-04-29 20:31:26 +01:00
Sunny Goyal
187b16cb91 Updating window manager estimation logic:
> Moving the code from ApiWrapper to Resource overlays for better maintainability
> Accounting for display cutouts in insets estimation
> Using same logic in display controller and view inset dispatching

Test: Verified on device
Bug: 221961069
Change-Id: I78466353563692ce3f7512b0146ef8b61ef14bc0
2022-03-09 11:15:58 -08:00
Alex Chau
b8c22e1155 Tune AllApps bottom sheet VisD and motion
- Make AllApps bottom sheet solid and appears from bottom
- Teleport AllApps bottom sheet as user drag to reduce drag range
  - Consider teleport interpolation for state transition sdetection
- Tuned workspace motions for AllApps bottom sheet (no translate, shrink)
- Add portrait vertical translate for tablet portrait including taskbar AllApps
- Updated bottom sheet handle and created common variables for other bottom sheets

Bug: 208599118
Test: manual on tablet AllApps, taskbar Allapps and handheld AllApps
Change-Id: I69dba5f155914cd012cc8ef3be1ef71fb2be5a40
2022-02-23 17:08:06 +00:00
Alex Chau
27b39b9668 Put AllApps in bottom sheet for tablets
http://screen/7steQ7W8U2ga3Hs

Bug: 208599118
Test: manual
Change-Id: I36cbac3cb7cb214081e5a33a6e042ae83e745f23
2022-01-19 18:57:34 +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
Vinit Nayak
8dcbde87c0 Move NavButtons to end of taskbar
* Layout hotseat icons from the end instead of the start
* IME down and system back arrow are now separate views

Bug: 191399224
Test: Tested w/ RTL + LTR in gesture
and 3 button nav w/ and w/o IME

Change-Id: I4d0ecd0bee0c519892c63eeefef45055b26d349b
2021-07-20 13:55:37 -07:00
Sunny Goyal
57b2279dcb Taskbar layout update
> Calculating the hotseat padding statically
> Animating taskbar views individually when animating to home
  instead of a layout animation
> Moving all navbar buttons to a separate layout/controller and independent
  of Launcher
> Fixing RTL layout for taskbar and nav bar

Bug: 187353581
Test: Manual
Change-Id: If21696f38beee328f553e467394776a8e8ed4c3e
2021-06-03 16:10:02 -07:00
Sunny Goyal
19ff728b92 Adding support for determining split layout for launcher.
> Simulating the windo wmanager API to get available device
  profiles until final API
> When a device has multiple internal displays, and with both
  tablet and phone possibilities, it uses a split workspace layout

Bug: 186160341
Bug: 175782275
Test: Manual
Change-Id: Ieff2329acac7cdd6b9abe6f96cd459cd45bd0efe
2021-05-03 14:48:28 -07:00
TreeHugger Robot
45167d6030 Merge "Removing dependency on wallpaper colors and using theme resources" into sc-dev 2021-04-28 03:00:17 +00:00
Sunny Goyal
4ed0fb5074 Removing dependency on wallpaper colors and using theme resources
Bug: 184676715
Test: Manual
Change-Id: Ie9a9a784c4a8a8cd484bfd8ea463deedcd4deed6
2021-04-27 16:29:08 -07:00
Zak Cohen
4d35ac3020 Allow Workspace Scrim to be colored per state
Make it possible to set the color of workspace scrim to a different color
per state. Motivated by making Overview Scrim and All Apps scrims different
colors.

Bug: 186253733
Test: Local build and flash
Change-Id: Id7c38ce3c9173308eedfcb7592ececa7bd6bf220
2021-04-27 14:04:46 -07:00
Sunny Goyal
c82916fecb Some cleanup in RecentsView
> Merging overview and all-apps scrims into a single View
> Decoupling TaskMenuView from taskView

Bug: 184676497
Test: Manual

Change-Id: I49f7249eaa2a800054385ab8e73a441d6a1b5e16
2021-04-06 15:47:33 -07:00
Sunny Goyal
c373e1c642 Adding an optional QSB in hotseat
Removing sections in all-apps during transition and treating
it as a single unit

Bug: 175137718
Test: Manual
Change-Id: I55a501d80b5903f1a9d92a26b3784784fd9e50fd
2021-03-17 12:21:44 -07:00
Vinit Nayak
d987a828e8 Initial commit of new split screen work.
TODO:
* Extract out common elements in TaskShortcutFactory.MultiWindowFactory
for commonalities between new and old way of
invoking split screen
* Integrate with WM APIs (b/182002789)
* Write tests for SplitSelectStateController

Bug: 181704764

Change-Id: Ice35adb4ea82897f5e2433dc9b93a549f3d511b5
2021-03-15 15:42:32 -07:00
Winson Chung
f99351888c Revert "Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ...""
This reverts commit 087a9e39b6.

Change-Id: I05b17a6e4aaaef6de3c2fa26aad45a39eb2833f9
2020-10-23 09:27:48 -07:00
Alistair Delva
087a9e39b6 Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ..."
Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert submission 12738409-merge_ub-launcher3-master_6877130

Reason for revert: Introduced crashes to global presubmit

Reverted Changes:
I624658ce6:Merge commit '8d14dbe041199d611839140f1c9285fd4174...
Iccd2f1e3a:Merging from ub-launcher3-master @ build 6877130
I791d64951:Merging from ub-launcher3-master @ build 6877130
Icdd32ab01:Merging from ub-launcher3-master @ build 6877130

Bug: 169963211
Change-Id: I77a4ae59e823147beae8dd7cb9b54ccdace2c7f4
2020-10-05 14:46:26 +00:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Tony Wickham
d844fe758c Remove ENABLE_OVERVIEW_ACTIONS flag, defaulting to true
We no longer support the "peeking" model where the shelf would
peek on motion pause from an app and overview would peek on motion
pause from home. Thus, removed/inlined the following:
- FlingAndHoldTouchController (merged into its sole subclass
  NoButtonNavbarToOverviewTouchController)
- ShelfPeekAnim
- OverviewPeekState

Change-Id: I066a3ad2636fde4786089c922b896bf1e03361fd
2020-08-14 15:58:29 -07:00
Raman Tenneti
ab98166c36 AOSP/Launcher3 - Update language to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: make and Presubmit verify.

Change-Id: I44e903046dd4cd9c7c07872fc56a8d552eb09522
2020-08-04 00:35:03 +00:00
Sunny Goyal
eaf7a95546 Changing minimum supported Launcher version to 26
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-29 17:30:19 -07:00
Tracy Zhou
0a0255812b Delete PreviewSurfaceRendered (launcher3 fork)
We had this class when we used SysUI to pipe through surface rendering, but this is no longer used after we swtiched to public API.

Bug: 152003916
Test: N/A
Change-Id: I21459c254c1e200ad1a193536e826dae9be2561d
2020-05-29 12:08:18 -07:00
Tracy Zhou
bc305fc7fe Support predicted icons in preview
Fixes: 152789575
Test: https://screenshot.googleplex.com/r3AtHp3TAh0
Change-Id: I22f7ee2a69f2df12ade16f50bf455651dbfce597
2020-05-29 09:58:01 -07:00
Sunny Goyal
8f96546e79 Generalizing LauncherState definition so that it can be used in RecentsActivity
> Removing 'Launcher' as parameter from state methods called by StateManager
> Converting state properties to methods for easier abstraction
> Moving state handling drom state definition to activity class

Change-Id: I997627df606a7e0bb3bf32688d045a942a47fc94
2020-04-30 01:01:51 -07:00
Zak Cohen
a39544d562 OverviewActions - Use launcher state to track modal state.
Test:local

Change-Id: I44e25b95095b9a7aac4b4172c9c91fbfbf4d9ec7
2020-04-27 16:29:44 -07:00
Tony Wickham
133cd54474 Refactor some onboarding-related shared prefs into a class
Bug: 151768994
Change-Id: I938e23af8c1874714e02fe34d0f9f82bb21d00a2
2020-04-10 21:06:08 -07:00
Sunny Goyal
284a6cfdd7 Removing base no-op implementation of depth controller
Change-Id: Ibf46c0a147d2772033ad469b803e606376978cd7
2020-03-24 16:11:06 -07:00
Lucas Dupin
4918ed38d2 Add wallpaper zoom to areas that have blur
Whenever blurring, the wallpaper should also zoom out. This is the
mental model of our Depth System.

Test: manual
Bug: 149792636
Change-Id: I1783eb87fefeb6f917f0ba64f2c6ec8f1f2004fa
2020-03-18 13:29:58 -07:00
TreeHugger Robot
c73071281b Merge "Moving animation config so a separate class" into ub-launcher3-master 2020-03-17 03:39:41 +00:00
Sunny Goyal
f3ac703256 Moving animation config so a separate class
Using PendingAnimation for animation builder.
This will allow us to easily add SpringAnimation to stateAnimation

Change-Id: I8d88489a5da6fc85747ef9be7c13858b441cd28a
2020-03-16 19:36:36 -07:00
Tracy Zhou
85f0c3b841 Use SurfaceView to render grid preview
Demo: https://drive.google.com/open?id=1wQ8dT5bfTxSh-NRQpNBwTCkKOtOOUMPj

Bug: 150224413
Test: Manual
Change-Id: I44e7baed1bcd15351e03dcbeb2b525bc1b325478
2020-03-12 23:06:36 -07:00
Winson Chung
8687bc2131 Initial changes to support blur
- Add a new controller to update the background blur on either the
  launcher or app surfaces based on state or transition

Bug: 149792636

Change-Id: I6103cd3d53a00c8025558dd49bb73137e2980014
2020-03-06 14:45:20 -08:00
Sunny Goyal
9f56a2f55a Using Display listener for landscape/seascape changes
Bug: 146150882
Change-Id: Idd2ef053bd10d9add93a1366e49c0e231f2c391b
2020-02-10 16:57:55 -08:00
Tony Wickham
c7203ad541 Make LauncherState transitionDuration overridable at runtime
This follows the pattern of most of the other state properties, and
allows us, for example, to extend the overview transition in 0-button
mode, but keep it shorter for other modes that don't travel as far.

Bug: 143361609
Change-Id: Ibf8142bf3f57bb73be826adb6f4a32c136ff56dc
2020-02-05 11:16:58 -08:00
Sunny Goyal
94fa76fbeb Updating feature flags subclassing
> Preventing debug flags to get change listener on release device

Bug: 147913781
Change-Id: I2bd0456918c5d3224c714b153c4565b1ef41d7c0
2020-01-21 14:22:58 -08:00