Commit Graph

106 Commits

Author SHA1 Message Date
Alex Chau ab26c62c4a Allow restore across form factors
- Removed deviceTypeCompatible check and allow restore across for mfactors
- In AOSP default device_profile, mark 3x3, 4x4, and 5x5 as phone only. On tablets they'll reflow to 6x5.

Bug: 198575341
Bug: 210129187
Test: Only 3x3, 4x4 and 5x5 are enabled on phone
Test: Only 6x5 is enabled on tablet
Test: Phone backup of 4x4 get restored and reflow to 6x5 on tablet
Change-Id: I36a641d47fcee86ace0fea3d9194d61d12517f13
2021-12-10 22:00:49 +00:00
Alex Chau 1c883d861e Add launcher grid spec for tablet
- Introduced device_category to allow grids to be only enabled for certain device types. By default grids are enabled for all device types, so old OEM device_profiles aren't affected
  - Removed device_profiles_split.xml as a result and merged with device_profiles.xml
- Added deviceType in InvariantDeviceProfile to replace isSplitDisplay and centralize the logic
- Only has 6x5 grid with new default layout that works better for tablets

Bug: 198575341
Test: manual
Change-Id: I03f6727ce837ffeee6321b6d7c53942338d0cf30
2021-12-08 18:22:34 +00:00
Thales Lima 4fb5b0470e launcher: add paddings to 5 row grids
Add new paddings for some devices, and bring grid spaces up to spec

Bug: 191879424
Fixes: 200810597
Fixes: 201690454
Fixes: 201711891
Fixes: 202082058
Bug: 202708085
Test: checking cell size and extra space in dumpsys and hsv
Change-Id: Ia13af870a89e5b933b24a0955dbd7b66446ebf4e
2021-10-15 14:16:09 +01:00
Thales Lima 1de4d55d55 launcher: create a device profile for foldables
This creates a device_profiles_split.xml that will be used when the
device is a foldable. This makes the changes contained for specific
devices and make it possible to use different padding files in the
future if needed.

Bug: 191879424
Test: tested with NexusLauncher and Launcher3, in foldables and
handhelds
Test: check that 4x4 is not scalable anymore on handhelds by using HSV

Change-Id: If6ef14e3611c5252634c080643433545ce186f0d
2021-10-14 22:42:25 +01:00
Steven Ng 43859f10bc Group weather widgets under the widget category
Test: manual (see video in bug) and added PackageUserKeyTest
      Also tested pending conversation widget to ensure the right icon
      is shown.
Fix: 201062480
Change-Id: If23c28bd93c54fb1747648309ab3c238a1810902
2021-09-30 14:22:21 +01:00
Alex Chau 1d5929dd82 Fix wrong screenId when committing emptyScreens
- Need to increment newScreenId whenever the screen is already bound
- Also cleaned up placeholder on w1 as we now have page pairing logic

Bug: 199160559
Bug: 175939730
Fix: 199131780
Test: drag and drop after clear data
Change-Id: Ic42f3bddfa6cf11b8b726d6181ed2477defde19d
2021-09-10 14:36:36 +01:00
Alex Chau fa3a209537 Only add 2nd screen by default for split display
Fixes: 175939730
Fixes: 196951827
Test: atest Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testWorkspace
Change-Id: I5b0acf162b7f63c6df8f55a6c7e2975e1748190a
2021-08-17 13:53:07 +00:00
Alex Chau 1e4484669d Remove widget panel
- Remove all usage of LEFT_PANEL_ID and fixed left panel code
- For preview renderer, load screen 0 + screen 1 instead
- Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162)
- Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162)

Bug: 175939730
Test: manual and TaplTestsLauncher3#testWorkSpace
Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
2021-08-13 21:48:35 +01:00
Jon Miranda 069f8c5ac9 Update hotseat sizing for 4x5 grids.
If the qsb bottom margin is smaller than the bottom insets,
we'll fall back to centering the qsb in the available freespace.

Bug: 194435265
Test: 4x5 grid
      multiple devices,
      with: gesture nav enabled
            3 button nav enabled

Merged-In: I9fd4f0da3f2bc9f0b38a621ad1192533260379e3
Change-Id: I711e7d168b80254e73df0d4e1854756d819a705b
2021-07-23 18:47:33 +00:00
Jon Miranda e4413cc6ae Update size limits to match spec.
Bug: 194124461
Test: Verified using screnshots over spec
      Only 4x5 grid is affected
      Tested on multiple devices, multiple display options

Change-Id: I301c512e416ed81f6d41f6f0ecbf5994d47d82bf
2021-07-22 16:26:18 -07:00
Jon Miranda f70265f4ec Add split_display device profile.
Bug: 192215417
Test: manual set isSplitDisplay=true, ensure the added device profile
      gets set on device
Change-Id: Ibe33c33d3af140352c0bb4fb44460106ad898285
2021-06-29 17:10:12 +00:00
Jon Miranda 8fc592d246 Update device paddings to spec.
Bug: 188094809
Test: verify using device profile dump
Change-Id: I51633d590bd9079ad62a79099b3f8df1cab7894c
2021-05-27 21:04:06 -07:00
Alex Chau a02eddc144 Handle config changes in Launcher
- This is practically a revert to http://ag/c/13687966/5 and refactored to use DisplayController.DisplayInfoChangeListener
- Make Launcher handle size and density change so transition is less janky when screen size changes
- Added fix in RecentsView to update state and TaskView when display profile changes
- Removed 720dp specific resoureces
- Removed unused widget_section_indent
- Removed unnecessary all_apps_background_canvas 600dp override that is not needed in AllApps+
- Moved remaining dp specific into DeviceProfile
- Simplified allowRotation logic to use single variable in DeviceProfile to determine if allow rotation is enabled by default

Fixes: 180803696
Test: manual
Change-Id: Iea0a7d1a0e14dc3613152dd3b3887450a2e1fc2f
2021-05-10 18:50:02 +01:00
Shan Huang 18caa92dba Add a background scrim to launcher for text protection.
This is a temporary approach to dim the wallpaper. Flip on ENABLE_WALLPAPER_SCRIM to enable the scrim.

In the long term we'll dim the wallpaper layer directly.

Test: Manual
Bug: 185890335
Change-Id: Ia88597bbcba6ae1536015d1b2a35260cab4a4453
2021-05-06 15:43:48 +08:00
Sunny Goyal 76e8fdc2bc Adding support for customize highlight region in preference
> Also fixing notification dots setting not getting highlighted

Bug: 184747760
Test: Manual
Change-Id: Ic9c2bfbb9750bed60afc14e824181f650c8cff33
2021-04-13 06:06:22 +00:00
Jon Miranda 71b954a257 Update device padding to allocate more space to workspaceBottomPAdding.
Bug: 175329686
Test: verify using DeviceProfile dump
Change-Id: I7054a49bf33e2c44bd1886a88dbed75c6807ab37
2021-04-05 16:59:15 -04:00
Jon Miranda c9e69fa98d Refactor device padding to be set per grid option
- Fixes bug where devices with scaled grids were not
  getting the correct deivce padding.
- Also fix bug where device padding was invalid.
  Added validation check when processing paddings to prevent
  this from happening again.

Bug: 175329686
Test: manual, enable debug flag,
      run and verify no crash from validation check

Change-Id: I35b019c40667c08de4fad95ac4b05b2d8f8a0e74
2021-03-24 14:58:44 -04:00
Jon Miranda 228877d37c Add border spacing and fixed cell height to grid.
- Border spacing is the spacing between the cells.
- Workspace cell height is now fixed, and we allocate
  all the "extra" space to three different variable height
  areas.

* Built behind ENABLE_FOUR_COLUMNS flag because it hinders the
default grid.

Bug: 175329686
Test: - set border spacing to 0 and confirm matches prior layout
      - test drag and drop still worked
      - test reordering
      - test widgets
      - test folders
      - test multiwindow

Change-Id: Ic6f3dff577d28ff214bda4b0a787ec7fd08c108b
2021-02-10 17:22:37 -05:00
Sunny Goyal b694a69f53 Integrating snapshot logging in Launcher
> Workspace snapshot is logged when the workspace loads (at most once a day)
> Removing unnecessary thread jumping when logging folders
> Preference snapshot is logged on process start and whenever something changes

Change-Id: I93767de89b11522d843c0e8300d1f108c78f6d90
2020-10-27 11:25:43 -07:00
Tracy Zhou af8516254e Get rid of grid options pref
Missed this one last time

Test: N/A
Change-Id: I7ecfa72f2f358342ea9f8296cdc5d0187498426b
2020-08-21 23:44:20 -07:00
Tracy Zhou 7df93d28d4 Setup infrastructure (multi-db support) for the new grid migration algorithm
We'll have a db for each grid option and a db for back up / restore.

TODO(pinyaoting): support back up / restore using the new infrastructure, particularly calls to GridBackupTable should use different DBs when the feature flag (NEW_GRID_MIGRATION_ALGORITHM) is on.

Bug: 144052802
Test: N/A

Change-Id: I644a3e70148bd78204a747a337446a3c038f616f
2020-02-05 19:55:05 -08:00
Sunny Goyal 7b97eebbe5 Adding utility class to load customization resources for easier prototype
Also adding support for grouping multiple plugins in same APK using process name

To customize resources update the defination of dymanic_resources in config.xml:
    <array name="dynamic_resources">
        <item>@color/delete_target_hover_tint</item>
        <item>@integer/config_folderDelay</item>
        <item>@dimen/all_apps_action_spacing</item>
        <item>@fraction/container_margin</item>
    </array>

Change-Id: I79c08845464510af96b16d375b424ad914657f39
2019-11-11 10:39:45 -08:00
Pinyao Ting c7a6c2979c migrate custom widgets in comply with plugin framework
Bug: 139888225
Change-Id: I8a3d0fe2689ad5ba24b19309728bbad0b6287f71
2019-08-30 12:06:22 -07:00
Hyunyoung Song 58de5de42a Add developer options for grid change for Styles
Bug: 118758696

Change-Id: I66cd36cda495d339e0c2550f0957e3fbcddca477
2019-05-16 13:38:38 -07:00
Ryan Mitchell 01b8b68db7 Rename launcher:iconSize attribute to prevent overriding material
A previous change [1] introduced the material library as a static library
for the SecondaryDisplayLauncher. The material library defines a
resource "attr/iconSize" with format="dimension" while Launcher3 defines
a resource of the same name with format="float". The material resource
is being overriden by the Launcher3 resource and is preventing aapt2
from disallowing multiple definitions of the same attribute with
different formats.

This change renames the Launcher3 iconSize so it will not collide with
the material resource.

[1] If183dd35a1d197c4a9a8225a021e36c4f1662587

Bug: 129146717
Test: build success and inspection of generated apk
Change-Id: I5eb54ea606ddcfb47d5150b44906a8707203e905
2019-04-24 16:22:51 +00:00
Sunny Goyal 9fc5ae7fa7 Moving folder shape logic definition to xml
Adding support for storing custom parameters in shape definition

Change-Id: I06f04f1836b337f8cc0ab2ad8c893bb03ae9c794
2019-01-07 12:35:35 -08:00
Hyunyoung Song a7a9583bb8 Remove IconShapeOverride
Bug: 120736782
Change-Id: Iee44f10ff2b9ec447ae74d9ad6a0aa3668c401d6
2018-12-19 17:16:56 -08:00
Sunny Goyal 415f173331 Changing the format for device profile definition
Device profiles are defined such that the grid size is fixed
and only the icon and text sizes change. For every grid size option
there are multiple display configurations.

Bug: 118758696
Change-Id: I54aac9106c576324b02530913c447e849b4ae1da
2018-12-07 00:06:25 -08:00
Tony Wickham f34bee819c Rename "badges" to "dots" where appropriate
This will reduce confusion with the other "badging" concept we use for,
e.g. work profiles. It is also consistent with the external name
"notification dots".

Change-Id: I2a2c9d96dc0d6284eb0c48adc78a856271caad4d
2018-12-04 10:46:40 -08:00
Sunny Goyal eae0514f1a Moving Plugin and feature flags UI to androidX
> Combining both preference into a single screen
> Adding plugin preference screen so quickstep build

Change-Id: I3d2ff3ebdac3c774659e79ecb81be6f75f765eb0
2018-10-25 13:07:42 -07:00
Sunny Goyal b2498b2790 Using support lib implementation for launcher preference
Bug: 117519297
Change-Id: Icea5e022a337436e48db9376fd441f805dc34e54
2018-10-19 18:09:40 +00:00
Ryan Lothian fa530cd23f Make flags UI available on release build of launcher
The UI will only be shown on eng/userdebug platform builds.

Bug: 117223984
Change-Id: I27843f2d856a4a19f3fe53c4d306606eaa5714a2
2018-10-15 17:24:48 -04:00
Jonathan Miranda d9d4b5b2dc Merge changes from topic "am-b9751869-5607-4cac-8442-b1dba848150a" into ub-launcher3-master
* changes:
  [automerger] Update launcher grid for tablet devices. am: 5eacbb7fc1
  Update launcher grid for tablet devices.
2018-08-02 22:16:06 +00:00
Jon Miranda 5eacbb7fc1 Update launcher grid for tablet devices.
* Number of hotseat icons matches number of workspace columns.
* Evenly space out the workspace icons.

Bug: 111617973
Change-Id: Ia80e6354c8d449f2a397db5fd432cebc9f23027f
2018-07-31 11:15:01 -07:00
Sunny Goyal 36b54228fc Retiring some feature flags
Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
2018-07-10 13:52:17 -07:00
Sunny Goyal c919a4fa94 Kepping the rotation setting UI always enabled and accessible
Bug: 77654352
Change-Id: Iade9ef33bc70fdbdac9ab39d6fa77113fb21549a
2018-04-20 12:00:43 -07:00
Sunny Goyal 40253329c5 Bringing back auto-rotate settings
Bug: 77654352
Change-Id: I0910fc8afe2fb7e125d57912abc35bbbd5df9d74
2018-04-19 09:27:56 -07:00
Sunny Goyal 623eddd7e8 Updating Launcher rotation logic
When auto-rotate is on, launcher allways allows rotation. This allows uses to use
locked rotation feature is available on the device
When auto-rotate is off, workspace does not allow rotation, but overview in quickstep
will allow rotation

Bug: 73872056
Change-Id: Ie12365c268fd5e4958634ed97b5a33dcadc691e2
2018-03-03 00:41:09 -08:00
Sunny Goyal b1d222e9a7 Removing support for app prediction from Launcher3
Derivative projects can extend the FloatingHeader to add support
to custom content in all-apps screen.

Change-Id: I4e29221a72e5a077a756713a6774cda7ecde8f1b
2018-01-30 20:53:11 -08:00
Sunny Goyal 3cf2d5093f Fixing wrong xml refenrece when the packageName is changed
Change-Id: I276d22e82dbef65eaa0f6c3331d7990292a62bc9
2017-11-07 15:41:16 -08:00
Sunny Goyal 952e63d006 Fixing custom widgets support:
> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets

Change-Id: I0e278bc7dd415713029364060ef10842da990be9
2017-09-13 14:04:35 -07:00
Sunny Goyal 848cad56ce Adding a warning button when notification access is not available
Bug: 63418030
Change-Id: I4c2c497d989902ac002314a3b8fb97083757958b
2017-07-10 11:10:35 -07:00
Hyunyoung Song 2c1814378c Reorder home settings
Bug: 62957388

Change-Id: I8fdc6448033d3c7f49396e506ef7f1fee45a7914
2017-06-26 12:17:25 -07:00
Jon Miranda b28c4fcf35 Landscape grid changes for Workspace/All Apps.
This is the just first CL to get eyes on the changes.
Next CL will update the All Apps to be full width.

Bug: 37015359
Change-Id: I2d7ec6851fdc13b8fa654e7e2be3152330243ccc
2017-06-23 11:47:48 -07:00
Tony 4eb823a4ce Fix typo in preferences
Bug: 62299923
Change-Id: I6e76a46f9e1fa7acf4b746840c33c914de364417
2017-06-12 12:44:43 -07:00
Tony Wickham 9863ea5dc7 Merge "Add setting to turn off icon badging" into ub-launcher3-dorval
am: d315d07aee

Change-Id: Id23914cbee040f3916257e02a9eb6b3f5a821b83
2017-05-16 23:38:22 +00:00
Tony Wickham 2ab8482809 Add setting to turn off icon badging
Redirects to system Notifications setting page.

Bug: 36815147
Change-Id: I5ee542f94ed51a73a57df3a726384944ff3ee71d
2017-05-16 14:08:42 -07:00
Sunny Goyal 05f30889d6 Adding support for DB downgrade
Adding a schema file for handling DB downgrade. This schema file is part of
the backup/restore set, and hence is available on a device with lower app version.

Bug: 37257575
Change-Id: I69c8ef5f28d5209be6e6679412c7459d4eeda5d0
2017-05-09 12:59:04 -07:00
Sunny Goyal ca18746163 Adding support for dynamically change icon shape for AdaptiveIcons
> This would allow developers to verify their icon designs on different
device configurations
> This settings is only visible when developer settings is enabled

Change-Id: I7e32abfede001c134f23390734dcd39c93b68b9a
2017-04-04 12:33:59 -07:00
Sunny Goyal 4179e9b88f Adding broadcast receiver to handle SESSION_COMMIT broadcast
> Disabling Install shortcut broadcast for O and above
> Adding a preference to control automatic icon addition on homescreen
> Adding icons on homescreen for new installs based on the above preference

Bug: 32920609
Bug: 27967412
Change-Id: I92e5cb7c841fb445dc8bc058d975f212ee54f8d1
2017-03-09 10:56:09 -08:00