Apply the extra top padding only if device is in portrait and aspect
ratio is beyond 1.5 to keep the original intent of avoiding showing
a single pane widget picker in super elongated form. In b/214215594,
a top padding was applied for w720, but in fold, it ended up showing
the picker only half way up. So, changed it to consider aspect ratio.
In b/315055849 the tablet portrait will use full width two pane picker,
and then, it will also not need this extra top padding. In that change,
we will use the flag to guard applying this extra padding.
See screen/cast/NTYwMjU1MzY4NDI5NTY4MHw3NDIxYzU0Mi1lNg
Test: WidgetPickerImageTest and Manual (screencast above)
Bug: 317013493
Flag: N/A
Change-Id: I90e0c416f0f05460960983588edf0068d99cd1a6
Right now, processWorkspaceItem is almost impossible to fully
understand. It is a behemoth of a method that handles everything
possibily related to processing a workspace item.
In order to make life easier for developers, it is being split into
smaller methods that deal with limited functionality each, and are
commented / named well. These can also be individually unit tested, so
developers don't have to use mock data anymore to test even the smallest
bit of functionality.
Bug: 318398886
Test: Manually verified that the workspace loading behavior still works
on device.
Flag: None, this is just a copy/paste refactor.
Change-Id: I040bce708cada5b29cf3488ddf37ccc8d7af8282
> Removing static mocks and using Sandbox context instead
> Removing inheritence in LauncherModel and converting LauncherApps.Callbacks
to a separate class. decMaker sometimes fails because of API changes in
LauncherApps.Callbacks
Bug: 319877828
Test: atest LoaderTaskTest
Flag: N/A
Change-Id: If78b5d83595627a355b284f52d887d75fef53014
This is necessary because the value of the read-write flag will not be updated in time for backup/restore.
Bug: 307527314
Test: compiles
Flag: ACONFIG ENABLE_LAUNCHER_BR_METRICS_FIXED TEAMFOOD
Change-Id: I67a1a820734d8881b3ed5be4a1f2f1556e6e4704
Introduce long-press shortcut to install a copy
of the main user app to private space.
Test: manual, installed apps in different stores
and tried shortcut
https://screenshot.googleplex.com/6oAVamTytiYmvPC.png
Bug: 316118005
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space_install_shortcut DEVELOPMENT
Change-Id: I702cd2a27388e3cc6e9e126308d5479836ba6655
It needs to be ensured that `updateDisallowBack` is called at startup after views are created.
Bug: 318786031
Flag: NONE
Test: Manual, i.e. verifying that back gesture is disabled after rebooting the device
Change-Id: I32812101c0e159f5cba41ab419f86de760449906
This allows us to reuse this logic at other places
Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: I2e19aad207efb3a99bb3b70ba71c076699dba2bc
In some situations, DeviceProfile is recreated with an invalid InvariantDeviceProfile leading to a crash, because it tries to use an non existent responsive grid spec. To prevent the crash, we are update the responsive grid two panel specs to use the default spec when two panel spec is not defined.
Bug: 317993862
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I8b8095745787ad47b006892452a54942f981713e
Also fixing it. When tapping outside of the folder to close it, avoiding touching the gesture area.
Bug: 187761685, 233075289
Test: presubmit, abtd
Flag: N/A
Change-Id: I99ada9e3d681f93a6d079827f1d4c5451a562266
Instead of adding a PendingView in appWidgetHost, attaching a
listener in PendingView for widget-updates.
This moves the view inflation as the last stage of widget
binding. Eventually we can separate the model update and view
inflation to different threads
Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: I124edaa9622fa367302b80969036d128a978396e
Refactoring the cellSize spec of responsive grid to divide the remainder space in code instead of dividing by cols/rows in the spec definition. For example, instead of using 0.2 in the spec for 5x5 grid (1 / number of rows), it is going to use 1 (100% of the remainder space) and divide the percentage by the number of cols or rows in code.
Fix: 313621277
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: CalculatedWorkspaceSpecTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: Ifaec838ac9751562ecedc1fe39b966ee3d092de3
Fix the icon step down logic to resize the icons to fit when isVerticalBarLayout and the iconSize does not fit inside the cellHeight.
Bug: 316087877
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I3a1fd28b729435eaf2dbbff650e4d13d33d77ff8
This happens when there isn't enough apps to fill in the private space container.
* Added test to check the correct regions are being set depending on the apps in the list.
* Need to set ROUND_BOTTOM_RIGHT to the last app item and the decorator would take care of it.
* Changed to use mNumAppsPerRowAllApps that is already set in ctor.
bug: 316116551
Test: manual/presubmit/photos:
before: https://screenshot.googleplex.com/4Uo5Vtu3a6MDuGa
after: https://screenshot.googleplex.com/878g8yv5LgPsHaL
Flag: None
Change-Id: Ic481628b824c75e5578f3129e3a48f575c6a3655
For some cases, even after reducing the iconSize and iconTextSize the content of the cell does not fit inside the cell height. This issue leads the icons or labels of the folders and workspace to crop. To prevent the icons of cropping when the display size or font size is largest (for acessibility) we allow the icons and labels shrink until it fits inside the defined cell height.
Bug: 314285621
Bug: 316087877
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Change-Id: Id8da3ee89658b9fc53a36d8605b9bd56ce168834
- Removes tapl overview test form platinum test suite
- adds individual overview test to platform scenario test.
Test: Presubmit, Manual
Bug: 303256981
Flag: NONE
Change-Id: I7d04dc5dc63ba3a5e63ad03d98760dbd24c974f8