Commit Graph

14019 Commits

Author SHA1 Message Date
Sunny Goyal cd89ca36b6 Fixing Launcher crash if activity restarts while resixing widget
When activity restarts, the widgetView gets onDetachFromWindow first
which inturn removes the AppWidgetResizeFrame from drawLayer while
the dispatchAttachToWindow was still in progress in DragLayer

Bug: 238416508
Test: Verified no crash after the change
Change-Id: I6359840c9fb3ae2719056845818620af19d3c94d
2022-07-13 12:22:01 -07:00
Sunny Goyal 251ee0a066 Merge "Removing tabWidth calculation and using DeviceProfile directly" into tm-qpr-dev 2022-07-08 15:39:30 +00:00
Becky Qiu da6a8fab1b [Toast] Add a feature flag to use local overrides for search timeout.
Bug: 229038631
Test: manual
Change-Id: I131ee7fc9bd7d09d7a4d4ee3f4577110ed75c0d4
2022-07-06 11:16:00 -07:00
Alex Chau 420ab0a45b Merge "Clean up DisplayController logs" into tm-qpr-dev 2022-07-06 17:27:29 +00:00
Tony Wickham 4b2bf90f2c Merge "Proper fix for gesture nav flicker using runOnPageScrollsInitialized()" into tm-qpr-dev 2022-07-06 16:30:01 +00:00
Tony Wickham 0c8ceda6e7 Merge "Move TEST_HARNESS_TRIGGER_TIMEOUT to MotionPauseDetector directly" into tm-qpr-dev 2022-07-06 16:25:03 +00:00
Thales Lima b8c0595d42 Add new hotseat bottom margin options
This changes how the hotseat height is calculated and by consequence how spaces are distributed in the workspace as well. This is the first of a series of changes that will improve and streamline workspace calculations.

Bug: 228998463
Fix: 234023782
Fix: 230191631
Fix: 232914299
Fix: 236238226
Test: manual, HSV and comparing to mocks
Change-Id: If021e8ba2c7c24c0bf9f27a1aa7aa946792ed04f
2022-07-05 15:33:47 +01:00
Pat Manning 0f8bbef729 Merge "Simplify vertical bar hotseat bottom calculation for spring loaded state." into tm-qpr-dev 2022-07-05 10:28:10 +00:00
Alex Chau 0adc36623d Clean up DisplayController logs
- Moved debug logs under DEBUG flag which defaults to false
- Moved info+ logs to permanent log tags

Fix: 198965093
Test: manual
Change-Id: Iea99f053da08e921542a8f532a9837997e10de5e
2022-07-04 13:13:44 +01:00
Pat Manning a7335bccdc Simplify vertical bar hotseat bottom calculation for spring loaded state.
Fix: 236941743
Test: manual.
Change-Id: I7f110fea48eb88e7f941a64c17a65feec14531f3
2022-07-04 12:45:40 +01:00
Jeremy Sim e19aab9010 Merge "Allows Launcher to recover gracefully into OverviewSplitSelect state" into tm-qpr-dev 2022-07-01 21:40:34 +00:00
Jeremy Sim c94f4b779b Allows Launcher to recover gracefully into OverviewSplitSelect state
When Launcher restarts (as the result of a UiModeChange or something else), it attempts to recover its previous state. However, the OverviewSplitSelect state is unique because it requires some additional information to recover properly (the taskId of the staged task and so on). This change makes it so that the relevant information is passed forward in the recovery bundle. Launcher will now restart in the base Overview state, and then immediately apply the saved data to recover the OverviewSplitSelect state.

Fixes: 233019928
Test: Manual
Change-Id: Ie6123ef9c374be000268f82857b696c49213c541
Merged-In: Ie6123ef9c374be000268f82857b696c49213c541
2022-07-01 00:07:54 +00:00
Sunny Goyal cb31a64299 Merge "Fixing widget accessibility node order" into tm-qpr-dev 2022-06-30 19:22:26 +00:00
Tony Wickham 539c2703ea Move TEST_HARNESS_TRIGGER_TIMEOUT to MotionPauseDetector directly
- Removed TestProtocol.sForcePauseTimeout and
  TestProtocol.REQUEST_SET_FORCE_PAUSE_TIMEOUT
- Instead, add MotionPauseDetector.TEST_HARNESS_TRIGGER_TIMEOUT, which
  is used when Utilities.IS_RUNNING_IN_TEST_HARNESS.

Test: unbundled/launcher/launcher3_test_platform
Fixes: 232548865
Change-Id: I224e99042b41375cab6bffd555434217518958c5
2022-06-30 12:16:08 -07:00
Abhilasha Chahal a8dcd442fe Merge "Allow overriding DragController and drag use cases" into tm-qpr-dev 2022-06-30 10:04:07 +00:00
TreeHugger Robot 72c5f330bf Merge "Add TAPL API for adding app icon to hotseat" into tm-qpr-dev 2022-06-30 05:28:14 +00:00
Sihua Ma 9ce586b3cb Merge "Fill the fade-in ImageView with its content for the cross fade animation" into tm-qpr-dev 2022-06-29 22:17:20 +00:00
Sunny Goyal 4827a7d5a9 Fixing widget accessibility node order
Making sure that that search and prediction bar are on top of
RecyclerView/PagedView. This is determined by the widget of the
drawn width of the views if their top matches

Bug: 209579563
Test: Verified that the tite is focused first when opening widgets
Change-Id: Ib800b3743ece915ac4894029462d5776d389ff3f
2022-06-29 11:32:36 -07:00
Abhilasha Chahal cb32935281 Allow overriding DragController and drag use cases
Test: Manually verified Launcher3 works fine
Bug: 233864888
Change-Id: Ifb2fe19c0a2b332862b36b1ac0100e0f5301a5a6
2022-06-29 17:29:47 +00:00
Sunny Goyal 24d7de43fb Merge "Fixing nullpointer exception when accessing StatsLogger before initialization" into tm-qpr-dev 2022-06-29 16:17:55 +00:00
Jeremy Sim 9b7280bd70 Merge "Prevents split thumbnails from flipping when entering Overview in fake seascape" into tm-qpr-dev 2022-06-29 05:47:09 +00:00
Vinit Nayak 6b05c8ce1f Merge "Close all open views for 1P and 3P launchers" into tm-qpr-dev 2022-06-28 16:24:16 +00:00
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 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 c4405218ca Merge "Log when MotionPauseDetector detects onMotionPauseChanged" into tm-qpr-dev 2022-06-27 17:28: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
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 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 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 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 c3a5c4b16e Merge "Fixing wrong flags used by AllAppsController in SystemUiController" into tm-qpr-dev 2022-06-23 22:52:11 +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
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 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 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 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
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