Commit Graph

453 Commits

Author SHA1 Message Date
Shamali Patwa
e532fc86b4 Merge "Update widgetsModel to return pickable vs all widgets separately." into main 2025-02-20 17:42:32 -08:00
Shamali P
f6efa25a49 Update widgetsModel to return pickable vs all widgets separately.
Earlier wallpaper preview was reading widgets that were eligible for
displaying in picker, which means widgets that are marked as hidden in
picker wouldn't show up in wallpaper preview.

This fix updates widgets model to maintain map of all widgets (instead of just pickable widgets like before), so that the existing `getWidgetsByComponentKey` function used by wallpaper preview can see all widgets. And, updates picker specific methods to use separate functions (suffixed `forPicker` that filter out picker ineligible widgets when read by picker code).

Bug: 385695615
Test: WidgetsModelTest, WidgetsPredictionUpdateTaskTest and demo
Flag: EXEMPT BUGFIX
Change-Id: I59efe38be0ce1f8a956ba4be42fb6e8b48b5d323
2025-02-20 14:13:16 -08:00
Charlie Anderson
b982bfede0 Merge "Removing Sunny shape option" into main 2025-02-20 06:40:12 -08:00
Charlie Anderson
96fa7a4c79 Removing Sunny shape option
Bug: 397683324
Test: selecting shapes, and presubmit
Flag: com.android.launcher3.enable_launcher_icon_shapes
Change-Id: I3d9ea0096674c07a860ba3d7dcc8074c4342a299
2025-02-19 17:46:27 +00:00
Sebastián Franco
dbec5640de Merge "Add DeviceProfile dump files into artifacts" into main 2025-02-19 09:37:38 -08:00
Sebastian Franco
190f3263a2 Add DeviceProfile dump files into artifacts
Artifacts are collected from:

    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="directory-keys" value="/data/user/0/com.google.android.apps.nexuslauncher/files" />
        <option name="collect-on-run-ended-only" value="true" />
    </metrics_collector>

Defined in NexusLauncherTests.xml, by writing the files into that
directory the files should show in the artifacts section when a
test fails.

Bug: 390496167
Flag: TEST_ONLY
Test: all dumpTest
Test: dump files should now be available in test artifacts
Change-Id: I046b1482afaea647351462983c4cbab5f3bc29bc
2025-02-18 18:56:48 -08:00
Treehugger Robot
e99943f092 Merge "Moving LauncherModel initialization to a separate class" into main 2025-02-18 16:56:02 -08:00
Charlie Anderson
7a7fcf5394 Merge "Fix WorkspaceItemProcessorTest for HSUM" into main 2025-02-18 13:39:05 -08:00
Sunny Goyal
b82394758f Moving LauncherModel initialization to a separate class
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: Ie210473a9e158faa421c00f115ffcca680f84ae4
2025-02-18 13:11:50 -08:00
Charlie Anderson
0e18dee91d Fix WorkspaceItemProcessorTest for HSUM
Bug: 395684478
Test: WorkspaceItemProcessorTest
Flag: EXEMPT test fix
Change-Id: Ib884af01fd225a01a7ba5408bcb38991b7b4c2c4
2025-02-18 13:43:47 -05:00
Charlie Anderson
3487ef52f2 Merge "Temporarily disable shapes flag in image and device dump tests." into main 2025-02-18 10:14:11 -08:00
Treehugger Robot
c7e545674d Merge "Fix issue where hotseat apps don't migrate to the new grid" into main 2025-02-14 17:40:51 -08:00
Charlie Anderson
24e65da8b3 Temporarily disable shapes flag in image and device dump tests.
Will re-enable after more shapes changes, as part of b/396211437

Bug: 396211437
Bug: 395952745
Flag: com.android.launcher3.enable_launcher_icon_shapes
Test: Presubmit
Change-Id: Ib0c85167df2723632adce9dadae718a2a1b7b757
2025-02-14 15:14:19 -05:00
Federico Baron
b8030e9627 Fix issue where hotseat apps don't migrate to the new grid
Hotseat apps would not migrate to a new grid if the new grid already had
hosteat filled out. This resolves the issue and addresses the issue of
workspace spots showing up as occuppied when they should be available

Bug: 395786587
Test: GridSizeMigrationTest, GridMigrationTest, ValidGridMigrationTest
Flag: EXEMPT bugfix
Change-Id: I79613986702c7dddf15a9a31c29b4ef59eac2b3a
2025-02-14 18:30:54 +00:00
Sunny Goyal
29f9c3d231 Merging IconShape with ThemeManager
The order of initialization for IconShape is closely tied to ThemeManager
which makes it difficult for change listeners to work. Merging these keeps
all the theming information at one place

Bug: 381897614
Test: Updated tests
Flag: EXEMPT refactor
Change-Id: Ie29efa20c3308a24be3e284c1c93ed7444b68d58
2025-02-13 22:38:01 -08:00
Treehugger Robot
6191d06684 Merge "launcher3: Improve SimpleBroadcastReceiver." into main 2025-02-12 18:19:35 -08:00
Treehugger Robot
6a039c4465 Merge "Implement isInDesktopMode*()" into main 2025-02-12 15:31:53 -08:00
Adnan Begovic
1b26bb4a74 launcher3: Improve SimpleBroadcastReceiver.
Unless explicitly annotated, parameters in java are by
  default nullable. There are a few cases where a null context
  may be passed to the unregisterReceiverSafely function
  of SimpleBroadcastReceiver.

  To mitigate misuses or incorrect contexts being passed for
  register vs unregister, keep the context as a strong reference
  in the constructor.

  Also added NonNull annotations for any public callsites to
  enforce behavior.

Bug: 395019017, 395966395
Flag: NONE - bug fixed
Test: manual - presubmit
Change-Id: Ie371fa45cadceaf51cf184b446df9123ef27c337
2025-02-12 13:43:34 -08:00
Ahmed Fakhry
ad6fee6111 Implement isInDesktopMode*()
This CL does the following:
- Adds new methods `isInDesktopMode()` and
  `isInDesktopModeAndNotInOverview()` to `DesktopVisibilityController`.
- These two methods rely on the new multi-desks impl when the flags are
  enabled.
- Makes the existing `areDesktopTasksVisible()` and
  `areDesktopTasksVisibleAndNotInOverview()` private, and migrates all
  the usages to the new methods.
- The new methods uses the old methods if the flags are disabled.

A companion NexusLauncher CL is at ag/31601363.

Bug: 394182435
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I29ff38f984bfe2f68a120f84e1a75fa36b739258
2025-02-12 21:18:51 +00:00
Sunny Goyal
5bca45a739 Moving InvariantDeviceProfile to Dagger
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: Ia99ee031e96c5e6069a56fe90a262a533dd8665a
2025-02-11 15:22:18 -08:00
Treehugger Robot
7456651ed7 Merge "Updating ThemeManager to be extendible" into main 2025-02-10 17:20:26 -08:00
Sunny Goyal
835461a148 Updating ThemeManager to be extendible
Moving the themeController inside the iconState object

Bug: 381897614
Test: atest ThemeManagerTest
Flag: EXEMPT refactor
Change-Id: I190be0af3202e97808f5dbda30ad0ca811581881
2025-02-10 11:49:32 -08:00
Charlie Anderson
ceb401c3e7 Revert^2 "Restore Archived Pinned Shortcuts instead of removing them."
This reverts commit f5cb1b664b.

Reason for revert: adding test fix and reverting

Change-Id: I2fc8dc83259b2ee7992ac2291df6ee4246a2e9d5
2025-02-07 12:14:55 -08:00
Treehugger Robot
026930cd14 Merge "Use pinned taskbar with desktop tasks on freeform displays" into main 2025-02-06 19:37:47 -08:00
Sunny Goyal
c9d9e335a4 Fixing ProxyPrefs not removing values correctly
Bug: 394600803
Flag: EXEMPT bugfix
Test: atest ProxyPrefsTest
Change-Id: Icb116df1826e9538c929a08f4e8afc32d1b1f183
2025-02-05 18:49:54 -08:00
Liana Kazanova (xWF)
f5cb1b664b Revert "Restore Archived Pinned Shortcuts instead of removing them."
This reverts commit abbb991d8f.

Reason for revert: DroidMonitor: Potential culprit for Bug X - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Ifa241a631a1a4361623cfe0e81e31ca6b44e9d73
2025-02-04 15:37:46 -08:00
Toni Barzic
860c4ee680 Use pinned taskbar with desktop tasks on freeform displays
Bug: 390665752
Flag: com.android.window.flags.enable_desktop_taskbar_on_freeform_displays
Test: manual on desktop device. verify correct taskbar is shown
      on home screen, in overview, in desktop mode, with fullscreen
      app shown. Verify opening/launching apps from taskbar works
      as expected.

Change-Id: I5c1e21799609c28ec44cc190bfc681934907199f
2025-02-04 13:00:37 -08:00
Charlie Anderson
abbb991d8f Restore Archived Pinned Shortcuts instead of removing them.
Bug: 375414891
Test: ShortcutsChangedTaskTest, WorkspaceItemProcessor test and manually backing up + restoring.
Flag: com.android.launcher3.restore_archived_shortcuts

Change-Id: I798d56bc1ffef9a454e3899e4155d63f7edf39f2
2025-02-04 11:29:29 -08:00
Treehugger Robot
0012e24fbc Merge "Use launcher db icon column to load pre-archived app icons on restore, similar to Promise Icons." into main 2025-01-31 19:10:15 -08:00
Charlie Anderson
0905744966 Use launcher db icon column to load pre-archived app icons on restore, similar to Promise Icons.
- includes loading icons for AllApps as archived apps show there as well

Bug: 391913214
Flag: com.android.launcher3.restore_archived_app_icons_from_db
Test: LoaderTaskTest, LoaderCursorTest and manually doing backup + restore
Change-Id: Icc9dc292551d4a3c6ac23de89aea4cb14856744c
2025-02-01 01:11:04 +00:00
Charlie Anderson
6009fa94b6 Merge "Add folder shapes for corresponding icon shapes" into main 2025-01-30 19:29:51 -08:00
Treehugger Robot
821572007d Merge "Revert^2 "Unifying various model update callbacks into one"" into main 2025-01-30 15:45:47 -08:00
Sunny Goyal
dfbbebc9e3 Revert^2 "Unifying various model update callbacks into one"
72f9943f64

Change-Id: I38901714947a2b7926723ea25df4a2b8216303e4
2025-01-30 13:19:32 -08:00
Priyanka Advani (xWF)
da2e19a821 Merge "Revert "Unifying various model update callbacks into one"" into main 2025-01-30 13:12:33 -08:00
Pechetty Sravani (xWF)
72f9943f64 Revert "Unifying various model update callbacks into one"
Revert submission 31445615-model-callbacks

Reason for revert: <Droidmonitor crested revert due to b/393222548. Will be verified through ABTD for stanadard investigation.>

Reverted changes: /q/submissionid:31445615-model-callbacks

Change-Id: If6893a125756e5abfbb215af377576429bb1c91b
2025-01-29 22:46:55 -08:00
Charlie Anderson
722f6f3143 Refactor ShortcutsChangedTask to Kotlin
Bug: 375414891
Test: ShortcutsChangedTaskTest
Flag: EXEMPT no functionality change
Change-Id: If80b74a80abf9bed90f1572a9fee2494d39a6829
2025-01-29 16:41:29 -08:00
Treehugger Robot
473bd5c0a0 Merge "Unifying various model update callbacks into one" into main 2025-01-29 16:05:25 -08:00
Charlie Anderson
fcb3d2ec38 Add folder shapes for corresponding icon shapes
Bug: 372886883
Bug: 389329983
Test: Presubmit && IconShapesProviderTest
Flag: com.android.launcher3.enable_launcher_icon_shapes

Change-Id: I46b27b391fef5f379c65d81816353c93f56f2e1d
2025-01-29 14:16:56 -08:00
Sunny Goyal
8141a71281 Merge "Fixing icon shape not properly clipped" into main 2025-01-29 10:43:46 -08:00
Sunny Goyal
4c261f7343 Fixing icon shape not properly clipped
> Using ShapeDelegate for icon clipping
> Creating ShapeDelegate based on the current icon shape
> Defining different shape delegates for icon and folder
> Updating preview rendering to use dagger graph
> Adding tests for all icon shapes

Bug: 392145015
Test: atest IconShapesProviderTest
Flag: com.android.launcher3.enable_launcher_icon_shapes

Change-Id: Ic9f287e2a6fef2aad18ba224404de58a64da0bb3
2025-01-29 16:24:38 +00:00
Charlie Anderson
db9bb3c869 Merge "Convert UserCache to use Dagger" into main 2025-01-28 16:15:03 -08:00
Sunny Goyal
36c3112abf Unifying various model update callbacks into one
Making the BubbleTextView.applyItem stateless so that it does not depend on the order of events

Bug: 390572144
Flag: EXEMPT refactor
Test: atest LauncherBindableItemsContainerTest
      atest BubbleTextViewTest
Change-Id: Ib9c0ac6c330d6f4e08c3db5772d35787fa056b65
2025-01-28 16:03:01 -08:00
Treehugger Robot
de6fea5e00 Merge "Fix hotseat issue on grid migration where extra items get removed" into main 2025-01-28 12:40:17 -08:00
Charlie Anderson
e90282b317 Convert UserCache to use Dagger
Bug: 372012340
Test: Presubmit
Flag: EXEMPT Dagger Change
Change-Id: I36a0a3f56540c0515d99badc127c2ab8534e684e
2025-01-28 15:30:07 -05:00
fbaron
a80aed9429 Fix hotseat issue on grid migration where extra items get removed
Flag: EXEMPT bugfix
Test: n/a
Fix: 333849747
Change-Id: I6bf3b291de33930764ca8e4fac82c59c328adbde
2025-01-28 17:07:47 +00:00
Treehugger Robot
196ba82377 Merge "Removing redudntant objects from BgDataModel" into main 2025-01-24 12:00:33 -08:00
Anushree Ganjam
481c67b6ce Fix the NPE in LockedUserStateTest since mocks gets cleared before the test finishes execution.
After ag/31327061 is merged, mocks get cleared in tests. In some
cases, mocks are cleared before the executors are completed. So, in
teardown, wait for the executors to complete.

Bug: 390716213
Test: atest and android studio builds
Flag: TEST_ONLY
Change-Id: Ie90b0f653d1619180cf177a1010aa646c97fac92
2025-01-23 14:46:59 -08:00
Sunny Goyal
777324ed15 Removing redudntant objects from BgDataModel
Bug: 390572144
Flag: EXEMPT refactor
Test: Updated model tests
Change-Id: Ied8a0bfdbfd324b9fb05724f1fcf67238aa37d16
2025-01-23 12:55:37 -08:00
Sunny Goyal
a5fef475a5 Revert "Revert "Migrating RecentsAnimationDeviceState and depend..."
Revert submission 31416515-revert-31332401-recents-device-state-LXBUANUQFL

Reason for revert: Fixing build breakage and resubmitting

Reverted changes: /q/submissionid:31416515-revert-31332401-recents-device-state-LXBUANUQFL

Change-Id: I3b89356df57f1e7ff1a9e364c0d766578e23798c
2025-01-22 18:31:06 -08:00
Liana Kazanova (xWF)
fa30e3fc0e Revert "Migrating RecentsAnimationDeviceState and dependent obje..."
Revert submission 31332401-recents-device-state

Reason for revert: DroidMonitor: Potential culprit for http://b/391684419 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:31332401-recents-device-state

Change-Id: I3986328ee3aa8ebb822f7ef05b9f80ef68872aef
2025-01-22 13:50:08 -08:00