Commit Graph

16456 Commits

Author SHA1 Message Date
TreeHugger Robot 5d749d93e6 Merge "Fixing widget size cache loop end-boundary" into tm-qpr-dev 2022-06-28 05:19:32 +00:00
Jeremy Sim 96c2aad623 Prevents split thumbnails from flipping when entering Overview in fake seascape
Fixes a bug where the user would see the splitscreen thumbnails swap position when entering Overview from fake seascape.

The bug arose because Overview's layout in fake seascape previously respected the primary-top secondary-bottom rule for placing splitscreen thumbnails. Actually, this needs to be flipped to preserve left-right orientation: If the user sees Task A on the left, it should always be on the left no matter how they rotate their device.

Fixed by swapping thumbnail and icon positions in SeascapePagedViewHandler#setSplitTaskSwipeRect() and setSplitIconParams(). Fake seascape will now show primary thumbnail on the "bottom" of the screen and secondary on "top."

This patch also corrects a minor calculation bug affecting icon alignment.

Fixes: 221133532
Test: Manual
Change-Id: Id587cf3815e64792d758d0e352da1e1e38cb4348
2022-06-27 22:33:30 +00:00
Pinyao Ting f6fc56bfc7 Merge "Cache and reuses LauncherAppWidgetHostView when launcher resumes" into tm-qpr-dev am: 6c7361fb46 am: 1d6add6c85
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18801673

Change-Id: Ibca945d73376bdad01d28a1839735b28da8b9727
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-27 21:24:08 +00:00
Pinyao Ting 6c7361fb46 Merge "Cache and reuses LauncherAppWidgetHostView when launcher resumes" into tm-qpr-dev 2022-06-27 20:51:22 +00:00
Sunny Goyal 977838b568 Fixing nullpointer exception when accessing StatsLogger before initialization
Bug: 236227523
Test: Manual
Change-Id: I2caaa143ab2ddd4442d5c56152c7b4a7c723b92b
2022-06-27 13:16:19 -07:00
Sunny Goyal 008238ef43 Fixing widget size cache loop end-boundary
Bug: 236961658
Test: Verified on device
Change-Id: Ied629cd875a01abc45a7d055edfde5e156de53ea
2022-06-27 11:25:57 -07:00
Tony Wickham 5ce98a18f4 Merge "Log when MotionPauseDetector detects onMotionPauseChanged" into tm-qpr-dev am: c4405218ca am: b653ac621b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19036576

Change-Id: Ie360f187fcae3078baf6ba8701547bb8e0e1e689
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-27 18:10:25 +00:00
Tony Wickham c4405218ca Merge "Log when MotionPauseDetector detects onMotionPauseChanged" into tm-qpr-dev 2022-06-27 17:28:17 +00:00
Alex Chau aacfa2b285 Merge "In AllApps search mode, only consume touch over visible container" into tm-qpr-dev am: 7cbe51c22f am: 1c3b2c017e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18994756

Change-Id: I5f4c0ebdbf280aaf8a5ad6d305e87eb301ee1957
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-27 10:27:17 +00:00
Chilun Huang 7662dae663 Add TAPL API for adding app icon to hotseat
Please refer to go/tapl-add-icon-to-hotseat for more details.

Bug: 231400119
Test: atest NexusLauncherTests:TaplTestsQuickstep#testAddDeleteShortcutOnHotseat
Change-Id: I8cadecbe742413e3ce35ff269c0f78057331532c
Merged-In: I8cadecbe742413e3ce35ff269c0f78057331532c
2022-06-27 11:10:21 +08:00
Chilun Huang 22e829eb2f Merge "Add TAPL API for adding app icon to hotseat" 2022-06-27 02:33:04 +00:00
Sunny Goyal 46e368f755 Removing tabWidth calculation and using DeviceProfile directly
This removes some dependency on FloatingHeaderView, making it
easier to replace

Bug: 234008165
Test: Verified that the UI does not change
Change-Id: I363c98c23f84fe570ea9cb1a40128359f5b67c9f
2022-06-24 13:32:42 -07:00
Alex Chau a3070ea61d In AllApps search mode, only consume touch over visible container
Bug: 236360930
Test: Tap on deadzone to dismiss AllApps in search mode
Test: touch outside recycler view inside container, doesn't swipe left/right
Change-Id: I18498ea50f217231c3bb4489d6d9e95fc0e7da53
2022-06-24 11:51:11 +01:00
Luca Zuccarini 9797a234f2 Merge "Unify the source of truth for NORMAL <> ALL_APPS transitions." into tm-qpr-dev am: 4a0129fa5f am: 0e12609cb2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18911769

Change-Id: I0c9d5f68008c4018e76db5121ff42f4af8315c66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-24 10:41:08 +00:00
Alex Chau aef83ce2a0 Merge "Disable header protection on tablets" into tm-qpr-dev am: f6674c27f7 am: 352e59ff3c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19034929

Change-Id: I2be7027ad8fa64af832573bb49dd2e85eba49c8a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-24 10:39:47 +00:00
Luca Zuccarini 4a0129fa5f Merge "Unify the source of truth for NORMAL <> ALL_APPS transitions." into tm-qpr-dev 2022-06-24 10:25:49 +00:00
Alex Chau f6674c27f7 Merge "Disable header protection on tablets" into tm-qpr-dev 2022-06-24 10:02:51 +00:00
Sebastián Franco 13d5b412cb Merge "Make Talkback anounce which page is the icon being move on." into tm-qpr-dev am: 578fbee848 am: 563d85ea48
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18918709

Change-Id: I16a78c864d2073812921939b4c63b6f2bb721a59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-24 07:39:44 +00:00
Sunny Goyal e79ec7b842 Merge "Moving widget padding to drawable instead of using itemDecorator" into tm-qpr-dev am: 1f5cc67c13 am: 0d9e46bbd5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19053219

Change-Id: I9a6ad31bdae09dff297a4213337af4e1bb3ac9fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-24 06:56:41 +00:00
Sebastián Franco 578fbee848 Merge "Make Talkback anounce which page is the icon being move on." into tm-qpr-dev 2022-06-24 04:54:31 +00:00
Sunny Goyal 1f5cc67c13 Merge "Moving widget padding to drawable instead of using itemDecorator" into tm-qpr-dev 2022-06-24 04:39:23 +00:00
Sebastián Franco 53e78a20e8 Merge "Added a content call to emulate the other devices displays" into tm-qpr-dev am: 1e2454eb85 am: 93e3d7bb0f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18935140

Change-Id: Id5fe56fcbcd35b3b6b26dd80c41ff41b7015bc2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-24 00:30:32 +00:00
Sebastián Franco 1e2454eb85 Merge "Added a content call to emulate the other devices displays" into tm-qpr-dev 2022-06-23 23:41:28 +00:00
Sunny Goyal 23dca1500b Merge "Fixing wrong flags used by AllAppsController in SystemUiController" into tm-qpr-dev am: c3a5c4b16e am: 062861eddc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19037687

Change-Id: I4c089c7b71faa32e5604e2cbf95be7a7e592fd55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 23:37:08 +00:00
Sunny Goyal c3a5c4b16e Merge "Fixing wrong flags used by AllAppsController in SystemUiController" into tm-qpr-dev 2022-06-23 22:52:11 +00:00
Brandon Dayauon a766a0c68e Merge "Fix work toggle button that gets blocked by threeButton nav bar on TABLETS" into tm-qpr-dev am: 0130315860 am: 118f4fb708
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18798069

Change-Id: If39d45886e1700ab58192e4ba65c75f05392e967
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 22:28:00 +00:00
Tony Wickham c214335eba Log when MotionPauseDetector detects onMotionPauseChanged
Test: verified logging locally
Bug: 232548865
Change-Id: I587481a380148127f715c5b1b59436b2cbc1533e
2022-06-23 15:05:42 -07:00
Brandon Dayauon 0130315860 Merge "Fix work toggle button that gets blocked by threeButton nav bar on TABLETS" into tm-qpr-dev 2022-06-23 21:45:12 +00:00
Sunny Goyal ed681548fc Moving widget padding to drawable instead of using itemDecorator
ItemDecorator uses item position which is not stable during animations.
Moving it to the background allows the padding to be stable

Bug: 236961658
Test: Verified that the app doesn't crash.
Change-Id: Ied12077de4097e827c5c4157f5196346a301f185
2022-06-23 14:37:17 -07:00
Chilun Huang a518e034f7 Add TAPL API for adding app icon to hotseat
Please refer to go/tapl-add-icon-to-hotseat for more details.

Bug: 231400119
Test: atest NexusLauncherTests:TaplTestsQuickstep#testAddDeleteShortcutOnHotseat
Change-Id: I8cadecbe742413e3ce35ff269c0f78057331532c
2022-06-23 19:24:18 +08:00
Sebastian Franco 930531f669 Make Talkback anounce which page is the icon being move on.
Adding a third argument for the talkback string.

Fix: 230593493
Test: Move an item using Talkback and it should mention the row,
column and page where you can drop the item.

Change-Id: Id3d4435e9ef3348278643e6e2a1cd1e8bf5157b7
2022-06-22 17:17:38 -07:00
Sihua Ma ecc272447c Fill the fade-in ImageView with its content for the cross fade animation
The cross fade function of DragView tries to match the shapes of the fade-in and fade-out views. However, ImageView (the fade-in view) by default only tries to match at least one axis between the content (the final view) and the bound (the ImageView bounding box). We need to make sure that the content fully fills the bound to exactly match the shapes.

Test: Manual
Fix: 221496442
Change-Id: I7c142d52b7bfbd0e266a917c27cbd40691fbf3c2
2022-06-22 20:59:32 +00:00
Brandon Dayauon 65590cb071 Fix work toggle button that gets blocked by threeButton nav bar on TABLETS
Ex) for tablets.. the nav bar height is really the height of the taskbar.
	Thats why we add the current padding of the work toggle button to the
	taskbar size.

As of patchset 3.. I reverted mDevice.getInsets().bottom because it caused
the button to be higher than it should be on landscape.
Bug: 235053326
Test: Manual (pictures in  bug thread)

Change-Id: I2f77d759ae060311d049182e8347dede590cd0b0
2022-06-22 13:21:25 -07:00
Sunny Goyal 24b441051e Fixing wrong flags used by AllAppsController in SystemUiController
Bug: 236857339
Test: Verified the UI manually
Change-Id: I2773837932ed50a59ebc9d2810f9e7ee501b6f6b
2022-06-22 12:09:22 -07:00
Alex Chau 05e6d084ec Disable header protection on tablets
- Also listen for config chagne in FloatingHeaderView

Fix: 218500759
Test: Change screen size between phone and tablet, header protection is only enabled for phone
Change-Id: I65120080641ea75ae58c010c4a27fe2b1539e0b5
2022-06-22 18:09:35 +01:00
Sebastian Franco 9097d7d09f Added a content call to emulate the other devices displays
Running the following commands should change your connected
device display:

  adb root
  adb shell setprop ro.test_harness 1
  adb shell pm enable --user 0 com.google.android.apps.nexuslauncher/com.android.launcher3.testing.TestInformationProvider
  adb shell content call --uri content://com.google.android.apps.nexuslauncher.TestInfo --method emulate-display --extra device:s:pixel5 --extra grid:s:crazy_big
  adb shell setprop ro.test_harness 0

Alternative method for this is using
  ./display_emulator.py emulate --device pixel5

I hooked up the existing DisplayEmulator into a content
provider. Doing this has a couple advantages to the previous method
of calling the emulator inside of a test. The biggest one is
that running the emulation doesn't restarts the Launcher3,
and because of that the previous method could leave the user in a
fake emulation where it looks like the device is being emulated but
is not 100% accurate.

Test: Run the command lines described above.
Fix: 229666646
Change-Id: Ia039fbaf4c7330d6bdf469633127f58d2466a1bf
2022-06-22 09:36:52 -07:00
TreeHugger Robot 2d674d6f03 Merge "Unifying scroll calculation logic for both widgets and apps recycler view Also using itemType instead of item object for widget size cache" into tm-qpr-dev am: 5069964ea2 am: 67d79af886
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18763224

Change-Id: Ic9c5e84835e0c7c714540d8c914486255dbe9dee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 03:54:09 +00:00
TreeHugger Robot 5069964ea2 Merge "Unifying scroll calculation logic for both widgets and apps recycler view Also using itemType instead of item object for widget size cache" into tm-qpr-dev 2022-06-22 03:23:07 +00:00
Alex Chau 485d77d6f9 Merge "Only check dbFile to decide if grid migration is needed" into tm-qpr-dev am: bd8111a049 am: ea4cd21275
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18929060

Change-Id: I03640ef87c3edf56b59037a21885748705602ced
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 20:51:44 +00:00
Alex Chau bd8111a049 Merge "Only check dbFile to decide if grid migration is needed" into tm-qpr-dev 2022-06-21 20:08:53 +00:00
Alex Chau aa9e4a28cf Merge "Revert "Add logs for InvariantDeviceProfile.getDeviceProfile"" into tm-qpr-dev am: 61c6b580ad am: 7b695ca337
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18929971

Change-Id: I2e6be505e70730d5e9222949350e35aac0b2ed56
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 18:52:27 +00:00
Alex Chau 49dcd16b26 Only check dbFile to decide if grid migration is needed
Fix: 234847755
Test: With a modified local build, when changing display config to swap between same grid:
- When dbFile is same but device type is different, no migration is performed
- When both dbFile and device type are different, migration is performed properly
Test: Grid migration through Wallpaper & Styles still works properly

Change-Id: Ie7429a7d59c135ba47061cae21c40b8d8af7188a
2022-06-21 12:36:50 +00:00
Sukesh Ram 521daeb05d Merge "Add app predictions to secondary display app drawer & fix tab UI." 2022-06-17 21:36:46 +00:00
Ronish Kalia 45ed73d955 Merge "Change access from private to protected for OverlayEdgeEffect vars" 2022-06-17 17:33:28 +00:00
Alex Chau b065b4b05a Revert "Add logs for InvariantDeviceProfile.getDeviceProfile"
This reverts commit d3e8cc40b4.

Reason for revert: b/231312158 is fixed, log is no longer needed
Fix: 231851651

Change-Id: I3ea8b9d14e7eb6f8f9c794c5d15cdfc94153d392
2022-06-17 09:36:00 +00:00
Sunny Goyal bbad97e273 Unifying scroll calculation logic for both widgets and apps recycler view
Also using itemType instead of item object for widget size cache

Bug: 234008165
Test: Verified on device
Change-Id: Ia4b4a00a11627c0c454e4a699570e8ab1667a390
2022-06-16 16:03:37 -07:00
Sukesh Ram 9e5fe63a22 Add app predictions to secondary display app drawer & fix tab UI.
Bug: 233926067
Test: Manual
Change-Id: I2f45a4b30964b365bf149e8864a3af2ea909a237
2022-06-16 22:44:24 +00:00
Sebastián Franco b4c50d485e Merge "Adding a case when there is only 1 system shortcut on the Popup Container" into tm-qpr-dev am: 2545f45a1f am: 2c102c3b73
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18284907

Change-Id: I9a684963b00da3ff6a994221cfece78846dbae32
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 17:39:49 +00:00
Sebastián Franco 2545f45a1f Merge "Adding a case when there is only 1 system shortcut on the Popup Container" into tm-qpr-dev 2022-06-16 17:01:10 +00:00
Luca Zuccarini c703f3a3e0 Unify the source of truth for NORMAL <> ALL_APPS transitions.
Bug: 231682175
Bug: 234812580
Test: manual
Change-Id: I5b66735474915d7a59bda337f67df37ff397908a
2022-06-16 16:40:26 +00:00