Commit Graph

21 Commits

Author SHA1 Message Date
Sunny Goyal
4610324261 Revert "Adding some logging around launcher grid when device profile changes"
Bug: 35425060
This reverts commit c29de85780.

Change-Id: I4320be3473f914289f88c8cbb376a68af006d7de
2017-03-20 16:08:17 -07:00
TreeHugger Robot
eb04b84153 Merge "Fixing wrong check for grid migration" into ub-launcher3-master 2017-02-16 18:08:15 +00:00
Sunny Goyal
f3a13e1584 Fixing wrong check for grid migration
Change-Id: I0475512302fd185fcd984d032cf19b34df3f8840
2017-02-15 14:42:47 -08:00
Sunny Goyal
c29de85780 Adding some logging around launcher grid when device profile changes
Bug: 35349518
Change-Id: Ia71504cd37749f8eaa5e038ac2867bcd9749a4bb
2017-02-15 14:40:30 -08:00
Sunny Goyal
87f784c285 Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context

Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
2017-01-11 12:52:03 -08:00
Sunny Goyal
f5e3744637 Updating version check method names
Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
2016-11-02 10:31:41 -07:00
Sunny Goyal
d70ef24233 Fixing the hotseat import logic
The import logic following the behavior: Improt everything and force
run GridMigrationTask to automatically remove broken icons.
This logic would fail for hotseat as the replacement happens before
the GridMigrationTask, which will not replace the broken targets
appropriately

The cl changes some logic only for hotseat import
> After import remove any broken icons/empty folders
> When adding default icons, only add as much icons as required. Since
GridMigrationTask uses weights, it sometimes removes imported icon, if
the hotseat size becomes too large.

Bug: 30909630
Change-Id: I6ca1f25dac81649794d81aaf82c3c38d1c918d91
2016-08-24 11:31:13 -07:00
Sunny Goyal
a5c8a9eb66 Adding logic to pull in workspace data from another Launcher3 based
provider. This allows OEMs to keep the user's homescreen intact while
changing the default home app package.

Bug: 28536314
Change-Id: Ibebfd7dd33aa2cbd9ca28d2d611dd0a4a5971444
2016-07-09 16:19:26 -07:00
Sunny Goyal
f03bd4f547 Build fix.
Missed some traces of key-value backup

Change-Id: Ifda94aa27aa53625bfb7ca173c6750c1b2433669
2016-07-09 15:43:07 -07:00
Sunny Goyal
eb77aaea89 Removing Key-Value pair backup logic as Launcher now uses full-data backup
Change-Id: I3bbaec2b33afe8c1da3ca1468c7c733cc3194604
2016-06-23 16:31:54 -07:00
Tony Wickham
ec1b1c542c Merge "Add support for launcher shortcuts." into ub-launcher3-calgary 2016-06-22 20:35:31 +00:00
Sunny Goyal
803896767b Fixing bug in GridSizeMigrationTask, where it was not accounting for
an extra space when there is no all-apps icon

Bug: 29569843
Change-Id: Ib768f0d069aed413bd8f4c2aa86ab1d3d657680e
2016-06-22 09:51:07 -07:00
Tony Wickham
bfbf7f9f4a Add support for launcher shortcuts.
- This CL has no UI but provides the necessary backing for one.
- Adds new item type: ITEM_TYPE_DEEP_SHORTCUT, to distinguish from
  ITEM_TYPE_SHORTCUT. We can reconsider these names.
- Adds ShortcutCache, using LruCache for up to 30 dynamic shortcuts
  (pinned shortcuts are always cached in a HashMap).
- DeepShortcutManager queries for shortcuts and other things like
  pin them. In a future CL it will use the cache, but for now it
  simply makes an RPC for all queries.
- LauncherModel maintains counts for pinned shortcuts, pinning and
  unpinning when counts reach 1 or 0, respectively.
- LauncherModel maintains a map of components to lists of shortcut ids,
  which Launcher gets a copy of after it is changed in the background.
  This will allow us to know how many shortcuts an app has immediately,
  and query for details as the UI is animating.

Change-Id: Ic526f374dd10d72a261bae67f07f098fca8d8bca
2016-06-21 15:49:16 -07:00
Sunny Goyal
bb011dad4e Adding a flag (enabled by default) to remove the all-apps button.
All apps can still be opened by clicking the caret.

Bug: 29398447
Change-Id: I61f1b05cea83a0a49d7cc16c518c5419618ba779
2016-06-17 08:17:22 -07:00
Sunny Goyal
a9e2f5abb3 Adding a DB update path to handle the QSB position change
> Renamed the id of 1st screen to 0 and making space for the QSB
by running the grid migration task.
> Added a feature flag to easily disable the QSB-in-workspace behavior

Change-Id: Ie3369f0d4433d916e9d6215d414770d4333f3e26
2016-06-15 10:03:12 -07:00
Sunny Goyal
da4fe1a624 Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).

Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
2016-05-27 18:23:29 -07:00
Sunny Goyal
ff4ba2d995 Refactoring out grid occupancy management in a separate class
Change-Id: I37a830c0f2eb0a0dd4f5fc78fa29127cb18cb3c2
2016-05-27 09:12:26 -07:00
Sunny Goyal
1ab22630a0 Fixing wrong grid size definitions
Bug: 27958565
Change-Id: Icabc651552bbf6483fedbaeb52745c48d418f9ea
2016-04-07 12:21:26 -07:00
Sunny Goyal
2e1efb480a Changing the widget loading strategy
Widget is loaded only when the user enters the overview mode and we keep
the list updated as long as the user is in the overview mode. Once the user
leaves the overview mode, we stop responding to widget updates

Bug: 26077457
Change-Id: I9e4904b8f1300bfe0d77e2bc5f59aa6963fad8d1
2016-03-09 20:21:22 -08:00
Sunny Goyal
f076eae0ca Adding support for migrating the grid between any two valid screens sizes.
The grid is migrated in steps where each step consists of at max one column change and at max one row change.
Adding some unit tests for GridMigrationLogic

Bug: 25958224
Change-Id: Ie54e872ea0925cc4c463edbba0a7201d62b373a0
2016-01-20 11:58:09 -08:00
Sunny Goyal
f862a26347 Extending the grid migration logic to handle density changes
For hotseat migratino, we simply drop the items with least weight
If the workspace row/column decreases by 2 or more, we clear the whole workspace

Bug: 25958224
Change-Id: I7131b955023d185ed10955f593184b9238546dc8
2016-01-06 10:16:44 -08:00