Commit Graph

349 Commits

Author SHA1 Message Date
Sunny Goyal a1cebfa0c0 Updating IconProvider API to use a single API to load icons
Bug: 366237794
Test: atest IconProviderTest
Flag: EXEMPT refactor, changes in underlying API

Change-Id: If8c6a4f13de7e7d262ee0b6d0c6897981f75e639
2024-09-26 22:13:11 -07:00
Sunny Goyal 621918feda Changing min-sdk version of Launcher to 31
Bug: 368071216
Flag: EXEMPT refactor -> dead code removal
Test: Presubmit
Change-Id: I1f0113c56de56f12f3a174eb31c3f8e8a09407e6
2024-09-20 06:00:10 +00:00
Jagrut Desai 65b5eb472e Merge "Unit Testing for TaskbarEduTooltipController" into main 2024-07-26 22:44:16 +00:00
Jagrut Desai 5af1bfbf52 Unit Testing for TaskbarEduTooltipController
This CL includes
	- TaskbarEduTooltipController Unit Test for all edu logic and hide tooltip
	- Test util class for taskbar controller test to run the test on main thread.
	- Refactored other controller test to use the new util function to run test on main thread.
	- Ability to disable running test in test harness mode.

Test: Presubmit
Bug: 346394824
Flag: TEST_ONLY
Change-Id: Ic623df8e7a58ac48d260e592ffab61d1f0658aef
2024-07-26 12:14:50 -07:00
Sebastian Franco 28e89bd10f Revert change to rotateBounds
Reason: Breaking Tapl tests.

Bug: 353965234
Flag: EXEMPT bugfix
Test: UtilitiesTest.kt
Change-Id: I2c513a190e5e9cba3f27b14c3835d3b039241467
2024-07-22 15:18:48 -07:00
Sebastian Franco 3780e096d6 Adding testin for Utilities.java
Happy testing week.

Bug: 353588686
Test: LauncherUtilitiesUnitTest
Flag: TEST_ONLY
Change-Id: I321aa9197a53801282591198aef0229d44da60d3
2024-07-17 11:28:24 -07:00
Pat Manning 19d5bc7a48 Scale AppPair background on hover.
Fix: 342133586
Test: manual.
Flag: EXEMPT bugfix
Change-Id: I2846b5543076688a90e8b9067f848c59e4081ea2
2024-07-03 11:31:11 +01:00
Andrew Cole f3fe08388c Merge "Always Return Adaptive Icon" into main 2024-05-13 16:42:35 +00:00
Andrew Cole 10149b6656 Always Return Adaptive Icon
As part of a cleanup for how we deal with legacy icons, we are consolidating our handling of how we wrap non-adaptive icons in an adaptive icon format. This requires adding a parameter to make these functions conform to their earlier specifications.

Bug: 318867282
Flag: None
Test: AllAppsSearchImageTest
Change-Id: I002c430646f8933c638b78a409c9766b6328838a
2024-05-10 14:04:23 -07:00
Winson Chung 36f38cb028 Merge "Add multi-instance state to item infos" into main 2024-05-10 04:16:38 +00:00
Winson Chung 94e8ad0731 Add multi-instance state to item infos
- Add legacy resource for supported multi-instance apps that
  matches the current SystemUI resource of the same name, and will
  be removed as apps migrate to the V manifest property to declare
  multi-instance support
- Load the multi-instance state from PackageManager when the db is
  first loaded or when packages are updated
- The multi-instance check is then used to determine if an app pair
  can be saved (ie. whether the action can be shown)

Bug: 323112914
Test: atest NexusLauncherTests

Change-Id: I565b4bee4ab5f7040910306b1fd60a4fc3bf9a1c
2024-05-09 18:43:38 +00:00
Willie Koomson 245c244fed Retain add button on rotation for two-pane and bottom sheet
Reselects the WidgetCell that was selected when reloading the sheet on
rotation. WidgetsFullSheet is excluded because it does not retain the
open header on rotation.

Bug: 331429554
Test: manual, see screencast
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: Id3d21f44b1dc525e144296f513f5a460fc51474c
2024-05-08 22:56:52 +00:00
fbaron 9d08e0fe70 Migrate smartspace as a widget and smartspace removal toggle flags to aconfig
Bug: 336823684, 336823681
Test: none
Flag: ACONFIG enable_smartspace_as_a_widget DISABLED
Flag: ACONFIG enable_smartspace_removal_toggle DISABLED
Change-Id: I4cba42e09f58365f761ab866b15a494817e6bb0f
2024-04-25 14:26:30 -07:00
Song Chun Fan e5ad96ce10 [Launcher/Archive] remove all checks for the archiving system property
No longer needed

Change-Id: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
BUG: 331165939
Test: builds
2024-04-08 23:14:07 +00:00
Fengjiang Li ea7cb497f5 [Predictive Back] Refactor setClipChildrenOnViewTree/restoreClipChildrenOnViewTree to support clipToPadding
Bug: 325930715
Test: Added unit test
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I509546ac4ee1fa851cf0648d365a5348362267cc
2024-03-19 15:28:38 -07:00
Fengjiang Li c51363fc46 [Predictive Back] Support WidgetsTwoPaneSheet
Fix: 325930715
Test: Manual - attached video to bug
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I44098de12253f803526160bce6457a940b2153c7
2024-03-18 15:31:13 -07:00
Jakob Schneider 328c32235e Add the archiving sysprop check to launcher3.
This system property will be used to test the feature
in DVT. This is required because the new device is built on U QPR3, not V. See
https://docs.google.com/document/d/1h8sLlnnhwGP4uZssglBqTShMoQcEq5dvR7jsJmmp0Cw/edit?resourcekey=0-KTFHkPKTdtMN-5kQYBWJig&tab=t.0#heading=h.x9snb54sjlu9  for more details.

Test: tested manually
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving TEAMFOOD

Change-Id: Ie64a40ba799c81057258dd7de3872a0494cff2d8
2024-02-06 14:29:07 +00:00
Andy Wickham b922dccbf5 Cleanup API checks for P, Q, and R.
Test: Build with gradle
Flag: NA
Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
2024-01-24 14:58:08 -08:00
Sunny Goyal 0d152a5bf6 Merge "Revert "Revert "Removing unnecessary iconFactory class when gene..."" into main 2023-12-06 16:11:43 +00:00
Sunny Goyal 3de59f24a0 Revert "Revert "Removing unnecessary iconFactory class when gene..."
Revert submission 25518508-revert-25483550-themed-badge-GJNKEECDMN

Reason for revert: Fixed badging bug

Reverted changes: /q/submissionid:25518508-revert-25483550-themed-badge-GJNKEECDMN

Change-Id: I0f378eaabcb7bdea855b80a33bdec007c9b11436
2023-12-04 18:53:50 +00:00
Sunny Goyal 6f04a32b21 Merge "Revert "Removing unnecessary iconFactory class when generating b..."" into main 2023-11-30 23:55:59 +00:00
Sunny Goyal dad66f4188 Revert "Removing unnecessary iconFactory class when generating b..."
Revert submission 25483550-themed-badge

Reason for revert: b/314097390

Reverted changes: /q/submissionid:25483550-themed-badge

Change-Id: I7ad16d7c5d5457d350ac6cff86d512c2f57dbcbf
2023-11-30 17:09:41 +00:00
Winson Chung abb4483f6f Merge "Add Launcher support for left-right splits on portrait foldables" into main 2023-11-30 05:52:57 +00:00
Winson Chung 104a4c8b69 Add Launcher support for left-right splits on portrait foldables
Bug: 291018646
Test: Manual
Flag: enable_left_right_split_in_portrait

Change-Id: I92af7ffd83770f7e942c3892a12b1611ff5b50f4
Signed-off-by: Winson Chung <winsonc@google.com>
2023-11-29 20:20:14 +00:00
Sunny Goyal 0069e54f1e Removing unnecessary iconFactory class when generating badged icon
Bug: 276957152
Test: Verified on device
Flag: None
Change-Id: I31ca3ef939684b16c0134d19f0add574b4b59706
2023-11-27 15:44:31 -08:00
Himanshu Gupta 6e030348dd Adding support for private/clone profile badge in Launcher3.
Bug: 289224457
Flag: None
Test: Flash on device and Presubmit
Change-Id: Icebb5b5129a2f0d909481f00d51e047431a23a15
2023-10-31 07:46:34 +00:00
Sunny Goyal 6eb256d794 Simplifying settings activity
> Removing multiple fragments
> Exposing support to select preference root
> Adding support for recreating preferences
> Moving Developer options to same fragment

Bug: 305084752
Flag: N/A
Test: Manual
Change-Id: I499be1938ef8ed58cbc7f9b0f4ad3510d4b306c8
2023-10-24 11:40:12 -07:00
Sunny Goyal bb903c9cb0 Using generated monochrome icon when actual icon is not available in the full drawable
Also simplifying the bitmap fetching path to return all relevant data in one-call

Bug: 299336510
Test: Verified that the icons are themed during drag and app launch
Flag: ENABLE_FORCED_MONO_ICON
Change-Id: Ib4c457e911e7b5616e8370d111cc68c5d6401fe6
2023-09-06 13:50:53 -07:00
Pat Manning 75708262fc Update scaleRectAboutCenter to correctly account for negative left/top values and floating point errors using centerX/Y.
Fix: 290211274
Test: manual.

Change-Id: Ieddce683d76c696b5ac3eae4fb9f73a5827a50ad
2023-07-19 14:47:32 +00:00
TreeHugger Robot d5b3a0a099 Merge "Removing explicit target SDK for launcher" into udc-qpr-dev 2023-06-27 22:34:40 +00:00
Sunny Goyal b02dafc1d4 Removing explicit target SDK for launcher
> It will automatically target the latest SDK it was compiled with

Bug: 284349887
Test: Presubmit and manual
Flag: N/A
Change-Id: I32629b0dd710c3c04d8f70f988b7279e7cae6731
2023-06-26 10:15:14 -07:00
fbaron 4ac0379f8b Add themed work badge for themed icons in dragview or floatingiconview
Bug: 288491653
Test: Verify that dragging icons with work badge have the right badge theming and that when the icons are animatng (e.g swipe to go back home from app) have the right themed/non-themed work badge
Change-Id: I3d75e83ebab0d99866f1fe3688dc06bb7e933a6e
2023-06-23 15:22:12 -07:00
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