Commit Graph

1710 Commits

Author SHA1 Message Date
Sihua Ma 8bbfcb6581 Move LauncherWidgetHolder to widget package
Making LauncherAppWidgetHost package-private as well

Bug: 235358918
Test: N/A
Change-Id: If022ec8d429579a972991872b2dc11db76719341
2022-11-16 14:31:14 -08:00
Sihua Ma aa2b872d1c Move most of the functions in LauncherAppWidgetHost to LauncherWidgetHolder
Test: N/A
Bug: 235358918
Change-Id: I343419376491203a195154f2766b12e5def38879
2022-11-16 14:30:08 -08:00
Luca Zuccarini 81f5cee2cb Fix IME sync flicker with 3-button navigation.
With keyboard sync, the dismissal is handled by the animator. Calling
hideKeyboard() on top of that causes the two signals to conflict with
each other, resulting in the visible flicker and extra delayed hiding
animation.

Fixes: 251185052
Test: manual, see videos in the bug

Change-Id: Ic12ad304ef9e4b6a51279ce18d6c09ba93bd59be
2022-11-08 17:26:46 +00:00
Sunny Goyal 82379187ea Adding support for multiple overlay callbacks
Bug: 193244407
Test: Presubmit
Change-Id: Ic345972056752238e7e46226533fd8f33d664213
2022-11-03 14:37:40 -07:00
Federico Baron 120c99f440 Merge "Tapping on a "folder" on the Homescreen right after returning home results in it starting to open, then canceling." into tm-qpr-dev 2022-11-01 17:56:50 +00:00
Tracy Zhou 0c853991fd Merge "Support split from fullscreen with shortcuts" into tm-qpr-dev 2022-11-01 17:17:33 +00:00
TreeHugger Robot d20e6676b1 Merge "Add dot pagination in workspace" into tm-qpr-dev 2022-11-01 04:33:29 +00:00
Tracy Zhou ba0b5952c8 Support split from fullscreen with shortcuts
Recording: https://recall.googleplex.com/projects/f46cfe9c-8076-4efe-bf8a-b1cc4f1f5e1b/sessions/978a3a55-2982-4026-9726-2a73cb694258

TODO: improve transition animation

Bug: 246661484
Test: manual
Change-Id: Id0d1aec0685bc18f4b273f8e466996efc1d9a3d8
Merged-In: Id0d1aec0685bc18f4b273f8e466996efc1d9a3d8
2022-11-01 04:30:39 +00:00
Federico Baron 8bf1bca59a Tapping on a "folder" on the Homescreen right after returning home results in it starting to open, then canceling.
Fix: 243531200, 253264925
Test: manual
Change-Id: I180300e8333536346ad07ce7bc9956d3b84d82e6
2022-10-31 15:12:17 -07:00
Sihua Ma 17137e8bce Merge "Created LauncherWidgetHolder as a wrapper for LauncherAppWidgetHost" into tm-qpr-dev 2022-10-27 17:53:28 +00:00
Becky Qiu 6a2dd438da Merge "[Toast] Use a BaseSearchConfig for launcher3 to read allapps device config." into tm-qpr-dev 2022-10-26 20:33:05 +00:00
Sihua Ma 0593a0d3ec Created LauncherWidgetHolder as a wrapper for LauncherAppWidgetHost
The wrapper class is created for further changes that will run the wrapped host in the background.

Test: N/A
Bug: 235358918
Change-Id: I9bd6fc2749c5d4a4d3391fb75d0c3ff1e13d17bf
2022-10-26 10:57:13 -07:00
Federico Baron a184511bb4 Add dot pagination in workspace
Here we add dot pagination (the same as the one in folders) to the workspace.

Bug: 254769710
Test: Turn on the flag SHOW_DOT_PAGINATION and check out the workspace
Change-Id: Ia1e9ec78eae661aa5e7c37b2b2f1ded38b138ce8
2022-10-25 15:14:37 -07:00
Sunny Goyal f34811d3a3 Revert "Revert "Updating the scroll calculation from recyclerView to avoid view inflation""
Test: ABTD
https://android-build.googleplex.com/builds/abtd/run/L52600000956969786

This reverts commit cee6ddf3de.

Reason for revert: Fixed in ag/20239136

Change-Id: I0e8446e66d9a86a94b40fcbd6de14da07abe8e5c
2022-10-22 15:37:47 +00:00
Becky Qiu 4ed3dfc28a [Toast] Use a BaseSearchConfig for launcher3 to read allapps device config.
Bug: 251387263
Test: local
Change-Id: I92c52caff377e627305bc7999ae0205fe6269968
2022-10-21 17:11:38 -07:00
Federico Baron 41235d529b Merge changes I03636e28,I6cf6d52e into tm-qpr-dev
* changes:
  Fix page indicator dots height in workspace
  Change delightful pagination flag and use it for workspace
2022-10-19 19:33:18 +00:00
Hui Kang 2a28ae8a3f Merge "Revert "Updating the scroll calculation from recyclerView to avoid view inflation"" into tm-qpr-dev 2022-10-17 21:20:09 +00:00
Hui Kang cee6ddf3de Revert "Updating the scroll calculation from recyclerView to avoid view inflation"
This reverts commit 20bbe95ddb.

Reason for revert: Causing flake in Ironwood test: b/248295569

Test: ABTD
Before: Flaky, 14/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L33900000956890639

Revert: 50/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L49200000956887317

Change-Id: I41f4428c74e581323f90c716a7852b5e553ae27d
2022-10-17 20:37:49 +00:00
TreeHugger Robot 1f7b2f9a7a Merge "Fix repeated empty workspaces after changing the grid size." into tm-qpr-dev 2022-10-10 16:57:59 +00:00
Luca Zuccarini bda972b2c9 [Toast] Switch to using device config to control keyboard sync.
Bug: 234812580
Test: followed the existing pattern and tested by manually setting and
unsetting the flag through command line - `adb shell device_config put
launcher enable_web_suggest_on_default_browser <true|false>`

Change-Id: Idd479e93b628b78fdf55d826c56f69c5cfdaf46e
2022-10-06 10:26:42 +00:00
Federico Baron 7539d7649c Change delightful pagination flag and use it for workspace
Before the flag name would only fit 'delightful pagination' for folders, but now we're adding that feature to workspace also, hence the flag rename.
The flag is now also used in launcher to show the new XML file that uses PageIndicatorDots rather than WorkspacePageIndicator

Bug: 249773534
Test: manual
Change-Id: I6cf6d52e76ad1ec60ecb54c5cca204e9ac35cc39
2022-10-05 09:31:43 -07:00
Sebastian Franco fa37a0ad9b Fix repeated empty workspaces after changing the grid size.
There are specific scenarios when you can force an extra empty
workspace after changing the grid, fortunately there is a
function that removes empty workspaces.

Fix:229349287
Test: Add a widget in a new empty workspace page, change the
grid then remove the widget in the new grid size then return
to the previous grid and it shouldn't have an empty workspace.

Change-Id: I7b73ae2ca058bc84b3b361930e3dc856c045281b
2022-09-27 21:51:17 +00:00
Becky Qiu dd002b87e0 Merge "[Toast] Change toast qpr1 feature flags to all apps device config." into tm-qpr-dev 2022-09-23 21:31:15 +00:00
Becky Qiu 3aec5d59dc [Toast] Change toast qpr1 feature flags to all apps device config.
Bug: 247122218
Test: local
Change-Id: I096f9fe4f8d071ea4b3292c6245da0c0ec509077
2022-09-23 11:59:56 -07:00
Yein Jo 18446d0189 Move OnBackInvoked to BaseActivity.
In order to have all the activities in Launcher get
the same OnBackInvoked behavior, the logic is moved to BaseActivity.

Test: Manual, Tapl
Bug: 238475344
Change-Id: I3f49091397e31fe1f183596f7fba3bf514697468
2022-09-20 16:53:41 +00:00
TreeHugger Robot 860657a5f2 Merge "Updating the scroll calculation from recyclerView to avoid view inflation" into tm-qpr-dev 2022-09-16 23:07:54 +00:00
Yein Jo dfaabbb499 Merge "Migrate Launcher to use the new OnBackInvokedCallback" into tm-qpr-dev 2022-09-16 21:44:49 +00:00
Yein Jo dc1b3660fe Migrate Launcher to use the new OnBackInvokedCallback
Bug: b/238475344
Test: Tapl & manual
Change-Id: Ieab329873f82890d95136e490086cc2cffff7ba8
2022-09-14 19:45:41 +00:00
Alex Chau 3d2c062567 Change wallpaper depth in widget picker
- Also changed widget picker open/close duration, refactored the values into DeviceProfile
- Generalized MultiAdditivePropertyFactory to accept aggregator as parameter

Bug: 240580498
Test: manual
Change-Id: I6886ca514593e404b8d7b0e8ed44f20ec2b77c73
2022-09-13 12:20:56 +08:00
Sunny Goyal 20bbe95ddb Updating the scroll calculation from recyclerView to avoid view inflation
> Updating the LayoutManager's scroll calculation instead of a separate
  implementation to better support recyclerView's calculations
> Caching the view sizes during layout to avoid view-inflation for
  unknown types
> Fixing scrollbar jump during scroll when widget list is expanded
> Fixing scrollbar never reaching end when onboarding card is displayed
  in work tab

Bug: 240343082
Test: Verified on device that new views are not inflated
Change-Id: Ied11ccf65b053691c5c126c4bf8de306ec24786d
2022-09-12 12:24:34 -07:00
Sunny Goyal 676d19c171 Merge "Removing back-button alpha animation code" into tm-qpr-dev 2022-09-12 16:04:34 +00:00
Sunny Goyal 8958a7078a Simplifying hideKeyboardAsync method
Bug: 246000321
Test: Presubmit
Change-Id: I2851c49b61b662d4a5b7cd0a863f690fd74a8bd0
Merged-In: I2851c49b61b662d4a5b7cd0a863f690fd74a8bd0
2022-09-10 04:01:48 +00:00
Sunny Goyal 1eb1124d82 Removing back-button alpha animation code
Back button is only animation in 2-button UI which is not supported anymore

Bug: 246006580
Test: Presubmit
Change-Id: I7385b07272e44c1f9f0488c158e1b4ee67060120
2022-09-09 17:15:24 -07:00
Sunny Goyal f2c6bf8346 Moving view capture dump to a service to allow longer timeout
Bug: 243827665
Test: Verified on device
Change-Id: I7273cc14d86620b52aaf71c7ea293bd643d881f9
2022-09-01 11:57:23 -07:00
Sunny Goyal c9c81ef320 Compressing view capture data and changing the format to avoid
storing duplicate strings

Also starting the dump process early to avoid timeouts

Bug: 242868825
Test: Verified on web-hv UI tool
Change-Id: I9943e41426f820c9ab70d39b9f01896ed060cab4
2022-08-17 16:48:27 -07:00
Sunny Goyal ee3ef1e991 Merge "Optimizing View capture logic" into tm-qpr-dev 2022-08-12 17:27:22 +00:00
Sunny Goyal a38aa060eb Optimizing View capture logic
Doing view capture in two passes
1) UI thread: creating a flat copy of the full view tree. Since
   view structure can change on the UI thread, this needs to be
   captured synchronously on UI thread.
2) BG thread: We capture the properties of the View on background
   thread using the flat tree created in the previous step. Since
   reading the properties is atomic, there is no synchronization
   issued.

One down side of this approach is that the properties might change
while the background-tep is underway. So all the properties of a
of a node may not represent the frame-state. But for the purpose
of animations, we can just refer a few continous frames.

Bug: 242095405
Test: Verified on device, frame capture reduced by at least 5x
      every time.
Change-Id: I0a61fb24669940b3b3533c0471e42e476709da55
2022-08-10 15:49:36 -07:00
Alex Chau 360ec033ac Use WindowManagerProxy.getRotation to determine if rotation has changed
- Follow-up of http://ag/19559863 as Config diff on windowConfiguration does not work on 3P Launcher, so diff WindowManagerProxy.getRotation instead
- Also centralized Configuration diff logic into StatefulActivity

Bug: 240730723
Test: manual on 90/180 degree rotation in Launcher, RecentsActivity and 3P Launcher
Change-Id: Ib368ed5d749841a6873a03e2644608ff68885922
2022-08-10 18:14:06 +01:00
Alex Chau ccc430e2c1 Detect potential WindowConfiguration change at onApplyWindowInsets
- Invoke onConfiguration when receiving inset changes
- In Laucnher/RecentsActivity onConfiguration, additionally detect for windowConfiguration's rotation change; if Configuration stays the same, it'll be ignored.

Bug: 240730723
Test: manual on 90/180 degree rotation in Launcher and RecentsActivity
Change-Id: I7087878af847d62e1c715a4f52a18818d1a6c258
2022-08-09 19:09:42 +01:00
Sunny Goyal a30cf8b7e1 Dumping view capture directly to file instead of loading it
all in memory

This avoid OOM when processing large data

Bug: 241600398
Test: Verified on device
Change-Id: I76072d52e47bea3a2f9802ce3b23ddae58fe8d23
2022-08-05 16:30:01 -07:00
TreeHugger Robot f47491bdf8 Merge "Remove unused logs" into tm-qpr-dev 2022-08-01 20:29:53 +00: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
Schneider Victor-tulias 1dbffe0af7 Remove unused logs
Fixes: 240173459
Test: Started launcher
Change-Id: I853d9a50a0c34a7fdda87ea20d46a9f7ac7542e3
2022-07-29 13:06:24 -07:00
TreeHugger Robot f49287d627 Merge "Listen to DisplayController for ignoreAutoRotateSettings" into tm-qpr-dev 2022-07-29 18:05:17 +00:00
Alex Chau 6209af67d3 Listen to DisplayController for ignoreAutoRotateSettings
- Also skip most of initDeviceProfile/onIdpChanged if DeviceProfile didn't actually change to effectively skip the 2nd unexpected onConfigurationChangeded caused by setRequestedOrientation (b/211763738)

Test: Change display size while in app or at home screen
Fix: 240019605
Change-Id: If307742639bd269622140a7da0dc900887c67937
2022-07-29 13:09:17 +01:00
vadimt f6ef879cf4 Moving all sources that are shared between Launcher and TAPL in one directory
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.

Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
2022-07-27 20:18:46 +00:00
Alex Chau 62572c04e2 Revert "Move BaseActivityInterface task size methods to DevicePr..."
Revert "Move BaseActivityInterface task size methods to DevicePr..."

Revert submission 19279487-baseactivityinterface

Reason for revert: As per discussion in ag/19341332, make sure DeviceProfile can properly react to inset changes before moving task size calculations there
Reverted Changes:
I30324d34c:Move BaseActivityInterface task size methods to De...
Ia9c1d0387:Move BaseActivityInterface task size methods to De...

Bug: 238593212
Change-Id: I0d40fdd4a5d4468494e30cef32a284479ddd2feb
2022-07-25 18:38:03 +00:00
Pat Manning 4e73e5e352 Move BaseActivityInterface task size methods to DeviceProfile.
Fix: 238593212
Test: DeviceProfilePhoneTest.kt
Test: DeviceProfileVerticalBarTest.kt
Test: DeviceProfilePhone3ButtonTest.kt
Test: DeviceProfileVerticalBar3ButtonTest.kt
Test: DeviceProfileTabletLandscapeTest.kt
Test: DeviceProfileTabletPortraitTest.kt
Test: DeviceProfileTabletLandscape3ButtonTest.kt
Test: DeviceProfileTabletPortrait3ButtonTest.kt
Test: DeviceProfileTwoPanelLandscapeTest.kt
Test: DeviceProfileTwoPanelPortraitTest.kt
Test: DeviceProfileTwoPanelLandscape3ButtonTest.kt
Test: DeviceProfileTwoPanelPortrait3ButtonTest.kt
Change-Id: I30324d34ca119a467f530b590949743c2ba7b91a
2022-07-18 16:35:02 +01:00
Alex Chau fbd9ebd0a0 Merge "Make workspace and hotseat scale down in widgets picker" into tm-qpr-dev 2022-07-12 10:08:20 +00:00
Sunny Goyal 25972b1f2f Adding support for continously capturing view hierarcy in Launcher
Bug: 238243939
Test: Verified data being captured and dumped
Change-Id: Ibe069d39ccf728f7b953f85085e58976be6e05ac
2022-07-11 15:43:54 -07:00