Commit Graph

307 Commits

Author SHA1 Message Date
Kshitij Gupta
f9fd430d68 Lawnchair: Fix serveral imports, fix QuickstepCompat* compilation
- Note: Currently, there is no real Q compat. Current Q Compat is the
  new R Compat. Yikes.
2021-02-05 22:24:09 +05:30
Kshitij Gupta
343e1530c5 Merge tag 'android-11.0.0_r28' of https://android.googlesource.com/platform/packages/apps/Launcher3 into r-staging
Android 11.0.0 release 28
2021-01-28 01:46:13 +05:30
Samuel Fufa
adbe9b6075 ADD NPE check before shortcut key creation.
Bug: 156871815
Change-Id: I88132a51f80062eaa76da5838d20c5fe93224635
2020-06-11 15:15:02 -07:00
paphonb
5e046fbf26 Fix corner radius for OxygenOS 2020-05-12 23:09:25 +07:00
Sunny Goyal
0addbf0512 Various multi-window fixes
> Fixing scale up calculator for swipe-down
> Offsetting pivot so that the preview is aligned to bottom-right
> Allowing insets to be available in multi-window mode as well
> Offsetting taskViewSimulator appropriately in multi-window mode

Change-Id: I7da4c145efca72ef219a5ffcaf23d726812df270
2020-04-29 11:50:33 -07:00
Tracy Zhou
df5d99f419 Merge "Refactor usage of getting GRID_OPTIONS_PREFERENCE_KEY value into whether GridOptionsProvider is enabled" into ub-launcher3-rvc-dev 2020-04-28 22:26:46 +00:00
Tracy Zhou
c6060e6e2a Refactor usage of getting GRID_OPTIONS_PREFERENCE_KEY value into whether GridOptionsProvider is enabled
Bug: 154154093
Test: manual testing of the feature
Change-Id: Ibe78a75b061aad20e8fa0e229589400b65016ff4
2020-04-28 14:02:49 -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
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Sunny Goyal
c4d3201538 Removing support for fake landscape
Bug: 111068105
Change-Id: If31d2f700ddee1d21541735de3a8006ee2a53c5c
2020-04-03 17:11:35 -07:00
Vinit Nayak
b9ec9319c5 Add fixed_rotation_transform to home settings
This sets the feature flag on launcher side
and also updates the setting in Settings.Global
Launcher DOES NOT listen to the Settings.Global
change from adb anymore. This should take
preference over setting it from command line.

Also fix a related swipe to home animation bug
that happened w/ merge conflict.

Fixes: 150260456
Test: Set and unset, visually verified behavior.
Tested w/ autorotate on and off.
Checked Settings.Global value correctly updated
via "adb shell settings get global
fixed_rotation_transform"
TODO: Update tests to reflect this new
default-on fixed rotation behavior.

Change-Id: Id95f006eb1e92a59e24b05567298fd21b1409b13
2020-03-11 19:38:33 -07:00
Vinit Nayak
a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08:00
Sunny Goyal
18204e4eea Various icon cache fixes
> Multiple instances of LauncherIcon created when
    LauncherIcons refers IconCache which in turn creates new LauncherIcons
> Widget icons are never cached as they were using low res icons
> Shortcut drag icons are not loaded synchronously
    when using PinItemRequest flow
> Wrong lastUpdatedTime is used in iconCache for shortcuts
> IconUpdateHandler does not ignore managedUser promise icons

Change-Id: Ie7eed68a30fad11d1861b6c70c380953a15ae1cf
2020-02-06 14:16:34 -08:00
TreeHugger Robot
0618d689e8 Merge changes from topic "state-supplier" into ub-launcher3-master
* changes:
  Translate recents slightly while dragging after pausing
  Two-zone model: swipe up from nav bar vs above it
  Change LauncherState to Supplier<LauncherState> in tests
2020-01-29 03:06:04 +00:00
Tony Wickham
4fdba14cfb Two-zone model: swipe up from nav bar vs above it
When ENABLE_OVERVIEW_ACTIONS flag is enabled, swiping up from the nav
bar goes to overview if you hold, or the first home screen if you don't.

- Added NoButtonNavBarToOverviewTouchController, which extends
  FlingAndHoldTouchController but only works if you start from the nav
  bar. Otherwise it falls back to PortraitStatesTouchController to
  handle normal state transition to all apps.
- Added HintState. This is where the workspace/hotseat/qsb scale down
  when you swipe up from the nav bar, to hint that you're about to
  either go to overview or the first home screen.
  - Added getQsbScaleAndTranslation() to allow Overview and Hint states
    to treat it as part of the hotseat.
  - Since Overview needs to show above the QSB as it's animating, bring
    Overview to the front and update OverviewScrim to handle the case
    where there's no view above Overview to draw the scrim beneath.
- ENABLE_OVERVIEW_ACTIONS is always false in 2-button mode, since the
  shelf is crucial to that mode.

Bug: 143361609
Change-Id: I743481bb239dc77f7024dc98ba68a43534da2637
2020-01-28 18:31:10 -08:00
Sunny Goyal
09b03c55df Optimizing some slow calls on the main thread
Change-Id: I4eed5f7e5bf1316556d6985a610918fc709a7471
2020-01-28 22:18:14 +00:00
Sunny Goyal
fa39536570 Removing static reference of deep shortcut manager
Bug: 141376165
Change-Id: Ie60b82be63a8926825598c681d8b2a1b2ace6413
2020-01-02 20:13:12 +00:00
Samuel Fufa
306177c14e Fix dragging icon badge offset
am: 37b2489ff7

Change-Id: Ibe7dbed4d3880086da14692597341ea9487efc29
2019-11-05 18:53:46 -08:00
Samuel Fufa
37b2489ff7 Fix dragging icon badge offset
Bug: 143702640
Test: Manual
Change-Id: I86d97c1f0ea02c86f4bf745a8bdda3887c62f27e
2019-11-05 15:29:22 -08:00
Sunny Goyal
14168431bd Adding support for dynamic calendar and clock icons
Change-Id: Icdba34340a27a4f6dff7310d0bf9fd29aef1330c
2019-10-29 13:50:02 -07:00
paphonb
dd9079cfb9 Disable overview preloading on older Q builds 2019-10-29 21:54:24 +07:00
paphonb
e63d0f7cec Merge remote-tracking branch 'launcher3/master' into q-merge 2019-10-29 16:47:55 +07:00
Sunny Goyal
3808a69a6c Storing BitmapInfo instead of icon and color directly in itemInfo
This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread

Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
2019-10-28 11:12:47 -07:00
paphonb
e3bd897b3a Fix workspace icon picker 2019-10-17 19:15:23 +07:00
paphonb
be328cabf6 Another attempt at fixing icon mask crash 2019-10-17 19:15:23 +07:00
paphonb
d1531a09e1 Implement rootless app predictor 2019-10-17 19:15:22 +07:00
paphonb
dee277b981 An attempt to fix icon masking NPE 2019-10-17 19:15:22 +07:00
TreeHugger Robot
f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
Samuel Fufa
aa038af6b3 Scale Icon badges for shortcut and widgets
Test: Manual
Bug: 141262820
Change-Id: I03edc986e3fe1876b6b7ed179b96864d587cb137
2019-10-04 17:06:33 -07:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
paphonb
8db1d39a60 Fix crash when going home to a cover folder 2019-09-11 19:01:07 +07:00
paphonb
37072ca627 Merge remote-tracking branch 'launcher3/android10-release' into q-merge 2019-09-09 22:37:38 +07:00
Sunny Goyal
6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
paphonb
8a5b1c2d07 Add option to hide statusbar clock when smartspace time is visible 2019-08-08 22:23:58 +07:00
Pinyao Ting
49a3e699f9 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 20:41:58 -07:00
Till Kottmann
f89ab39584 Samsung: Hide work mode toggle to prevent breaking secure folder 2019-07-30 13:22:03 +07:00
Tony Wickham
f05d3f8fd4 Revert the changes that prevented touch on RecentsView during animation
am: b6841ac630

Change-Id: Ia0c9ec7a600e5d3064297630d16eb862d486bf45
2019-07-22 15:57:55 -07:00
Tony Wickham
b6841ac630 Revert the changes that prevented touch on RecentsView during animation
The original bug that was solving seems to be fixed by other changes,
and this allows users to scroll, dismiss, etc on recent tasks before
fully reaching overview from an app.

Bug: 137487381
Change-Id: I28a708811bba3ce739ce261f19eb29558d8f0e7d
2019-07-22 12:39:59 -07:00
Till Kottmann
10893eeda7 Fix accent color extraction on OOS 9.5+ 2019-07-23 00:08:52 +08:00
Till Kottmann
115e33760a Seperate dock icon size from desktop icon size 2019-07-22 21:47:13 +08:00
Sunny Goyal
9dbb27c09c Moving some utilities methods to separate class
Change-Id: I5094b22ddc77c45590cea1a5f5dead0dc7580abf
2019-07-17 15:15:07 -07:00
Till Kottmann
e23acb1bb4 Add support for web search providers with suggestions 2019-07-04 13:39:53 +02:00
Sunny Goyal
c4bb3739b1 Cleaning up some animation states:
> When running one-off animations during quickstep, cancelling prevoisly
  running animations.
> Cancelling such one-off animations when state is reset
> Preventing touch proxied from recent transition to affect quickswitch
  (by affecting pagedView)

Bug: 135686388
Bug: 135571566
Change-Id: Id647015a583761d8fd46a02e3e2d88027e282a79
2019-06-21 12:47:56 -07:00
Sunny Goyal
5b636ebfd4 Optimizing some layouts in taskview
> Recycling DigitalWellBeingToast so that the view is not inflated everytime
> Simplifying DigitalWellBeingToast to use a single text view
> Adding support for footers in taskView without creating additional layout

Bug: 122345781
Change-Id: Ia889819b93eb8644532ea95c6767554874d5e2d1
2019-06-13 10:39:46 -07:00
Sunny Goyal
878aa33567 Using squared hypot to optimize some comparisions
Change-Id: Ia5b99c2e60eedf02dea26857819f0e13127db4e2
2019-05-20 15:20:47 -07:00
Sunny Goyal
0334047553 Updating SDK check now that the version code is finalized
Change-Id: I2b8d65885f83154f7500adb520b1eed1da5c4a4e
2019-05-17 16:57:23 -07:00
Hyunyoung Song
58de5de42a Add developer options for grid change for Styles
Bug: 118758696

Change-Id: I66cd36cda495d339e0c2550f0957e3fbcddca477
2019-05-16 13:38:38 -07:00
Jon Miranda
4028575ba0 Fade in badges on top of icons after swipe up animation.
Bug: 123900446
Change-Id: I54e367e0be72781e24d13ec6ea64dbddd85fb0bd
2019-05-15 09:37:24 -07:00
Jon Miranda
c7206caf6e Ensure app widget ids are restored after database is sanitized.
Previously, it was possible for AppWidgetsRestoredReceiver to
start the restore process before work profile has finished restoring which
resulted in the work profile items being removed from the workspace.

Bug: 131315856
Change-Id: I2f295a1ca91f1996522bcc8052aa139979526e3b
2019-05-14 17:30:04 +00:00
vadimt
1b383af652 Not using magic constants for navbar height
Change-Id: I6783b8a2ebb059ce35748d8c3e818cbe732ff40d
2019-05-08 17:20:34 -07:00