Commit Graph

317 Commits

Author SHA1 Message Date
Schneider Victor-tulias
add179c73c Merge "Translate the navigation setting text to prevent overlapping with home gesture hint" into tm-qpr-dev am: f1a0bd61f4 am: 673549f1df
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21681580

Change-Id: I08dbf939bc287a84b43e7bcdbaadc9866267b582
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 21:53:23 +00:00
Brian Isganitis
8ecb5eeb62 Merge changes from topic "running-in-test-camel" into tm-qpr-dev am: d2d2913812 am: 0c15dabc48
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21725479

Change-Id: I3d02a42c2d0bdebc2487def8696d9a489aca7311
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 00:08:07 +00:00
Schneider Victor-tulias
ec76d6e4b9 Translate the navigation setting text to prevent overlapping with home gesture hint
On large fonts and display sizes, the navigation settings text can overlap with the home gesture hint. Adding some additional translation to account for this.

Fixes: 269716511
Test: Launched all set page on the largest and default font and display sizes on a phone
Change-Id: I4a40b06b827667de9b0bdb893320b0a9890f6699
2023-03-06 19:14:40 +00:00
Brian Isganitis
fdd044e16e Expose IS_RUNNING_IN_TEST_HARNESS as static method.
This variable is now mutable, making the uppercase format misleading.
For instance, users might assume they can use this value in other
immutable properties, when they really should be accessing the latest
value every time they need it.

Context: https://source.android.com/docs/setup/contribute/code-style#follow-field-naming-conventions

Test: Manual
Bug: 271160958
Change-Id: Iaaa51d9153cb8a7d686c72e1210b1948029dcfd5
2023-03-03 00:17:33 +00:00
Sunny Goyal
12b79e6cbf Merge "Moving IS_DEBUG_DEVICE to a compile time flag for better proguard support" into tm-qpr-dev am: ae030217db am: 68cf24e532
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21550341

Change-Id: I46accbd8fa0579d78826685091f95ad7ce787228
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 01:11:26 +00:00
Tracy Zhou
d248ee7507 [Gesture Library Integration] Update the check for motion events on
trackpad

The gesture library is ported and enabled, thus we are updating our
check for motion events on trackpad.

Bug: 254783214
Test: Swipe up and hold to go to overview; swipe up to go home
Change-Id: I4b74e88c7f8b6ef86c779391b0f8064ea828ed8f
2023-02-23 20:58:22 +00:00
Sunny Goyal
29fa0f3b66 Moving IS_DEBUG_DEVICE to a compile time flag for better proguard support
Bug: 270386012
Test: Presubmit
Change-Id: Ic4a81567f5b9752ab17c725566ce728c3d767bd6
2023-02-22 17:02:45 -08:00
Pat Manning
4faa11aea1 Merge "Animate grid tasks to modal state." into tm-qpr-dev am: 1b27affb03 am: 3eadaa7d77
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21060663

Change-Id: Icd9a71482cfbb235d03b0fadfbfd6f74d4bc44d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 14:09:34 +00:00
Pat Manning
1b27affb03 Merge "Animate grid tasks to modal state." into tm-qpr-dev 2023-02-22 11:18:47 +00:00
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
Pat Manning
550181e69e Animate grid tasks to modal state.
Bug: 265641913
Test: OverviewActionsControllerTest.java
Change-Id: I5cfa5bc3a9e0fdc024d0d709bfb2b5eccd6ea5a2
2023-02-20 17:10:01 +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