Commit Graph

307 Commits

Author SHA1 Message Date
Sunny Goyal
9411e22e39 Merge "Adding support for customizing shortcut pinning logic" into tm-qpr-dev am: 85d15e78d0 am: ba88f8f880
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21325312

Change-Id: I2833a14e1554a62d02b000a1a2218da8f4eb0505
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-20 20:33:19 +00:00
Sunny Goyal
239d6e9b8d Adding support for customizing shortcut pinning logic
> Allowing support for overring shortcut badge
> Updating pendingShortcutInfo so that the
  handler can be easily overridden

Bug: 268253894
Test: Verified on device
Change-Id: I3184cb6494bc98c7eed33798b35b4e6e6a1e7ddc
2023-02-17 18:07:23 +00:00
Liahav Eitan
6b67ef6391 Merge "Update strings when work apps are paused" 2023-02-15 20:54:54 +00:00
Anthony Alridge
edd886b550 Update strings when work apps are paused
Test: Manually tested - screenshots in bug
Change-Id: I0b7b633f1eb71829752c991018e7c260f22d8cbb
Bug: 258628706
2023-02-14 23:52:35 +00:00
Tracy Zhou
68ca43f7ad Revert "Use movement on the trackpad instead of on screen for trackpad gestures used for gesture nav"
This reverts commit aef9d75f78.

Reason for revert: The movement on the screen is proportional to the movement on the trackpad for gestures since finger ballistics only applies to cursor movement

Change-Id: Idd7f948545c35988183cfac0b74c730cf699d5f9
2023-02-09 22:25:45 +00:00
Vinit Nayak
a15f39bc6d Merge "Unify split options into single option" into tm-qpr-dev am: 6fa1ab9441 am: 4e1c1faa37
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21074650

Change-Id: If7bdd0fe1a72d5e321933eb566e58f20fbfefcf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-03 07:09:18 +00:00
Vinit Nayak
5a6863f14a Unify split options into single option
* No more split left/right/top, only have
splitscreen and icon shows vertical or horizontal
split windows
* Replace existing split icon for FreeForm

Fixes: 264930810
Test: Tested landscape and portrait, workspace,
overview, allapps

Change-Id: I443f93b6b01760b726bf9f024fb1324fdf0ed03c
2023-02-01 17:27:57 -08:00
Vinit Nayak
da2819ed5f Improves overview split adjacent launch animation
* Translation gets scaled along with the parent,
so the secondary thumbnailView which has a translate on
it gets exaggerated as the parent goes to fullscreen
scale.
* Now we inversely scale translationX/Y properties,
however it seems like the interpolation is still slighly
off at the beginning of the animation (or maybe some other
value, such as pivot, etc)

Bug: 260814999
Test: Manually slowed down animation and observed
Change-Id: I831476b4ffb582fecbd166525ceea33623e66bdd
Merged-In: I831476b4ffb582fecbd166525ceea33623e66bdd
2023-01-05 11:54:22 -08:00
Vinit Nayak
9740ba4bf1 Improves overview split adjacent launch animation
* Translation gets scaled along with the parent,
so the secondary thumbnailView which has a translate on
it gets exaggerated as the parent goes to fullscreen
scale.
* Now we inversely scale translationX/Y properties,
however it seems like the interpolation is still slighly
off at the beginning of the animation (or maybe some other
value, such as pivot, etc)

Bug: 260814999
Test: Manually slowed down animation and observed
Change-Id: I831476b4ffb582fecbd166525ceea33623e66bdd
2023-01-05 19:53:28 +00:00
TreeHugger Robot
e5b7e43dab Merge "Removing SearchActionItemInfo" into tm-qpr-dev am: cfa199537b am: d48a078c78
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20537169

Change-Id: If4a0f59f32b7b2e74313ac1076abbcdaf74ab96b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 18:22:31 +00:00
Sunny Goyal
9a616213e1 Removing SearchActionItemInfo
> Instead introducing an interface for handling click events
> Linking this interface to other UI which handle clicks

Bug: 259733681
Test: Presubmit and verified manually
Change-Id: I9cbf2d009d64254f513deb909a151e46e860d039
2022-11-30 10:59:07 -08:00
Stefan Andonian
953a517765 Merge "Move SharedPreferences code to its own class." into tm-qpr-dev am: 3233010c5a am: b626411c99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20446860

Change-Id: Ibafb226c2bc6bd1ea425725920520540a8720351
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 00:47:28 +00:00
Stefan Andonian
146701ca3e Move SharedPreferences code to its own class.
Bug: 251502424
Test: Code compiled correctly.
Change-Id: Iea0d6ab2999504117546ee0f7adc0c7b8b45c065
2022-11-17 17:22:47 +00:00
Sunny Goyal
47d4d81b4f Cleaning Utilities.java
> Removing some unused methods
> Moving some specialized methods to corresponding classes
> Removing GridProvider check as it is released

Bug: 257555083
Test: Presubmit
Change-Id: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
Merged-In: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
2022-11-17 01:06:16 +00:00
Sunny Goyal
ea76d35278 Cleaning Utilities.java
> Removing some unused methods
> Moving some specialized methods to corresponding classes
> Removing GridProvider check as it is released

Bug: 257555083
Test: Presubmit
Change-Id: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
2022-11-15 20:21:56 +00:00
Tracy Zhou
0b96f63514 Merge "Use movement on the trackpad instead of on screen for trackpad gestures used for gesture nav" 2022-11-11 22:31:35 +00:00
Tracy Zhou
aef9d75f78 Use movement on the trackpad instead of on screen for trackpad gestures used for gesture nav
Bug: 254783214
Test: https://recall.googleplex.com/projects/3388b17c-d22f-46f8-b140-a102690377b4/sessions/f3311fbc-d8cf-4f19-b83c-8626aa285452
Change-Id: Iad2da5831af85dd3647e1e31b42fea0a6302b49c
2022-11-11 00:05:03 -08:00
TreeHugger Robot
5a84fe1817 Merge "Create test for default grid" into tm-qpr-dev am: 267d7179cd am: ed50adb7b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20347132

Change-Id: I00abba38b3cd56d73bdef126493c1b7c601ad380
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 20:42:43 +00:00
Thales Lima
b67bfa7512 Create test for default grid
Fixes: 256044695
Test: DeviceDefaultGridTest
Change-Id: Ie0a4de12f777ad3d15020252b2f67b575cc0eca9
2022-11-09 14:00:44 +00:00
Tracy Zhou
6d8afb2187 Allow two finger gesture from trackpad to pull down notification from home
Fixes: 255602235
Test: manual
Change-Id: I99742320b322a1e7b04bad0e374fcc48f8871ce1
2022-10-25 19:03:52 +00:00
Nick Chameyev
cbfb35edc7 Extract PreviewPositionHelper to shared library
Moves Launcher's PreviewPositionHelper to shared
library between SystemUI and Launcher to reuse
it in the future in the partial screensharing
recents selector.

There should be no functional changes in the
code itself.

Bug: 240924926
Test: presubmit
Change-Id: Ib38b6f9db91e63a2598bf81229e3cd3e1a49ca60
2022-10-05 10:23:54 +01:00
Schneider Victor-tulias
24637f50c5 Add input consumer selection reason to active gesture logs
Test: manually tried gestures in 3 button and gesture nav and checked logs
Bug: 227514916
Change-Id: I7a48d960ef5a41ddee95153fa08a2345f00cbef7
2022-08-25 10:03:30 -07:00
Pat Manning
5f74bfd76d Refactor DeviceProfile tests based on dump() and use real device dimensions for tests.
- Added roundPxValueFromFloat when converting dp/sp to px to deterministically round up values around .5

Fix: 240133465
Bug: 237542518
Test: DeviceProfileTest.kt
Change-Id: If4239f714487fe5bf2ef44274e2ce415bd75c86d
2022-08-01 17:54:43 +00:00
Sunny Goyal
4a35dd4f0d Do not launch home disambiguation screen when home is not known
Bug: 233071361
Test: Verified on device
Change-Id: I54e71e19363920b0778c328dc391575d0921f304
2022-05-23 23:30:58 +00:00
Andras Kloczl
0056e95d8e Change home dragging logic for dead zones
- If a dragged item is not over a valid drop target
then we don't highlight anything and on drop we move
it back to its original position.
- Instead of checking if the dragged item is over the
hotseat view, now we check if the item is over the hotseat
shortcuts.
- Smartspace is a dead zone

Test: drag items from different workspaces, allapps, widget
  picker etc. to all parts of the screen and verify which
  view is targeted and where the item gets dropped.
  Check on phone/foldable/tablet.
Bug: 228201267
Change-Id: I18de576ea300d58ae645e511b238e0b946b5595a
2022-04-26 16:28:11 +01:00
Sunny Goyal
645af0a6b3 Revert "fix broken build on erorrprone"
Revert submission 17730702-fixErrorProneBuild

Reason for revert: Breaks Launcher3 unbundled build by using hidden library in main Launcher code
Reverted Changes:
Id0ce4d308:Change version checks to use SdkLevel.isAtLeast*
I8fc801b00:fix broken build on erorrprone

Change-Id: Ib1cd50a746bad3b6fb9fbd455a7cdce30f341d8b
2022-04-14 16:54:07 -07:00
kholoud mohamed
9db305478e fix broken build on erorrprone
Bug: 229190745
Test: m -j out/soong/.intermediates/packages/apps/Launcher3/Launcher3/android_common/lint/lint-baseline.xml
Change-Id: I8fc801b0051a7e14578fa331b22653f109c1dcc6
2022-04-14 14:18:30 +01:00
Jeremy Sim
e15927eec7 Merge "Implement splitting from Taskbar long-press" into tm-dev 2022-04-09 01:21:14 +00:00
Jeremy Sim
abdf25d226 Implement splitting from Taskbar long-press
Implements the ability to split the screen by long-pressing a Taskbar icon.

Bug: 217964720
Test: Manual
Change-Id: I5d324d8ca912c10cc3c3de21cae98fad546b85ac
2022-04-08 12:15:16 -07:00
Sebastian Franco
d2d8e97a65 Make the text for the drop target buttons fit if it's too long.
The text "Don't suggest app" is too long when the device language
is GE or JA, or if you make the text bigger in settings.

Before truncating the text completely we are going to try to make
the text smaller until it gets to a predefined value
(button_drop_target_min_text_size).

Test: Change the language to German (Deutch) and install a new app and drag it to the workspace to see the button "App nicht vorschlagen"
Test: Also, a nice way to test is to go to SecondaryDropTarget#setupUi and hardcode the option to always show "Don't suggest app"
Fix: 221480721
Change-Id: I99def4e23cd17109a297aecaa620cef7a0d137e7
2022-04-07 16:39:29 +00:00
Brian Isganitis
88319c4828 Add utility for isWallpaperSupported.
Test: Manual
Bug: 223549757
Change-Id: I910ad82ab12790f082525353dbdb86def93e3c04
2022-03-21 17:09:24 -07:00
Jon Miranda
0aa263c5a0 Do not theme icons when the original view is not themed.
Fixes bug where animations uses themed icons in All Apps, where the
icons are not themed.

We want the DragView themed since all valid drop locations will have it
appear themed.

Bug: 215650713
Test: open/close an app from All Apps
Change-Id: I9969ce4921831dd12858ed9b0fe64379e9e3b188
2022-02-15 13:16:22 -08:00
Andy Wickham
8e3131898f Merge "Utilities.trim never returns null." 2022-01-28 00:35:50 +00:00
Andy Wickham
56be73be80 Utilities.trim never returns null.
This fixes a crash loop I was seeing on my device and also
preemptively fixes similar NullPointerExceptions.

Bug: 213931730
Test: Manually verified crash loop stopped with this change.
Change-Id: I8d2fc8475d42ac60b7fdc9219421a8c9733c7b9f
2022-01-18 09:13:43 -08:00
Tony Wickham
7b40594bc7 Merge changes I36f6cfb8,I7c784765
* changes:
  Create new window for Taskbar Nav Buttons when taskbar is focusable
  Make taskbar focusable when folder is open to get IME input
2022-01-14 17:12:08 +00:00
Tony Wickham
66971f87e1 Create new window for Taskbar Nav Buttons when taskbar is focusable
Test: Open folder from taskbar, edit name, ensure back button displays above IME and that IME sends input to the taskbar folder name
Bug: 205803170
Change-Id: I36f6cfb835aa7da280f15ea4b0aed8923ce8a012
2022-01-12 14:22:47 -08:00
Sunny Goyal
68af549a45 Adding icon theming API support in Launcher
Bug: 200082620
Test: manual
Change-Id: If986b9cfc3db79d627d2a6f1304e1b6f58491470
2022-01-08 00:05:47 +05:30
Sunny Goyal
d872a97bd0 Updating icon badging logic
Bug: 201682172
Test: Manual
Change-Id: I57421b0c77e12f1cd464e532d2a1383c2cf93981
2021-12-02 22:14:25 +00:00
Hyunyoung Song
c2f024beb6 Fix wrong getIconBounds method inside BubbleTextView
Bug: 205065809
Test: screenshot on the bug

TL;DR;; created two variants depending on the layout direction

Change-Id: I9c5e74409c701b1f219ca450de0dca2291507045
2021-11-09 11:39:21 -08:00
Schneider Victor-tulias
16e04e29d2 Generalize the icon popup menu types.
Generalized popup menu types and logic to allow wider uses outside of launcher.

Bug: 198438631
Test: long pressed launcher icons and pressed menu options
Change-Id: Iadcbb1796496c0061dcee362784e426ff55dc94a
2021-10-19 16:06:16 -07:00
sfufa@google.com
1c5e607940 [Search] Scale up small search icons on drag start
Bug: 199341710
Test: manual
Change-Id: I243c3e84e3093d4a9c605b187a625c0580d9933f
2021-10-05 18:09:26 -07:00
Sunny Goyal
68031ca3f9 Storing form factor as part of backup and disabling restore if form-factor is different
Bug: 195301649
Test: Manual
Change-Id: I9a9c4bc9246f40af2209cb914b3966319bc78bff
2021-08-04 09:51:04 -07:00
Vinit Nayak
7903758d08 Animate SplitPlaceholderView when entering split from overview
Bugs tracked in b/181704764

Bug: 181704764
Test: Tested on phone and large screen in multiple orientations

Change-Id: I07509006ae3d1f4425dc5119d0c8ed52b41a3bc2
2021-07-22 20:12:26 +00:00
Steven Ng
b33e38242f Merge "Modify AT_LEAST_S check to include SDK int" into sc-dev am: 1184a03b08
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15002455

Change-Id: I9a2ed9eb320f6b8ce469d1c4fca96fb8218953fd
2021-06-17 09:19:45 +00:00
Steven Ng
7e31e9b267 Modify AT_LEAST_S check to include SDK int
BuildCompat.isAtLeastS() in Launcher dependency only checks if the
code name is "S". In the recent version of Android, the code name has
changed to "REL".

Test: Open Widgets picker, expand Conversations and observe a preview
      layout is shown.
Fix: 191239040, 191216821
Change-Id: I6a6e647d4cb327d251bde3484ea2d2e79c0f86f5
2021-06-16 23:56:38 +01:00
Cyrus Boadway
801dbf90c4 Merge "Use the splash screen background color as the fallback background color" into sc-dev am: 3616f29f83
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14881306

Change-Id: I5ad3b65fb0e74ca77e37aa9bea590f82519283a0
2021-06-12 17:27:27 +00:00
Cyrus Boadway
9f06168692 Use the splash screen background color as the fallback background color
For the widget transition animation fallback background color, use either
the splash screen background color if a task is starting or the task
description-attached background color.

With a background in place, allow the window to fully fade out before
fading in the widget, by moving the window alpha math into an animation
factory-specific implementation.

Bug: 187706750
Test: Manual
Change-Id: I2b5a7783b0585d447ad60534bc48d2e2176877ed
2021-06-10 21:03:24 +00:00
Tony Wickham
c7cbf254f3 Let DragView use ActivityContext instead of Launcher
- Make DragView abstract and extended by LauncherDragView for the explicitly Launcher-specific parts.
- Some other methods like Utilities.getFullDrawable() now accept (Activity)Context rather than Launcher.

Test: Compiles and runs, manual drag and drop
Bug: 182981908
Change-Id: I77b7a2e48ce864dd711c3232217fdba4d60c546f
2021-05-25 15:35:55 -07:00
Sunny Goyal
e9d27f137f Updating method for getting themed icon
Bug: 183641907
Test: Manual
Change-Id: I417886acea1b518c184d8e7c649367cae841a7e4
2021-05-21 12:29:15 -07:00
Sunny Goyal
d5500548dc Revert^2 "Moving taskbar lifecycle to TouchInteractionService"
430465a3d5
Bug: 187353581
Change-Id: I7b2280d16adfafd3e85ffc1d22e32d0c00d12b67
2021-05-21 07:05:02 +00:00