Commit Graph

712 Commits

Author SHA1 Message Date
Tony Wickham 94e0d37f53 Initial spring loaded workspace.
It is a bit clunky and doesn't have the App Info drag bar at the
bottom yet, but it is a start.

Also removed page hints because they are no longer used.

Change-Id: I1f8f82d33e6694cab1f1c762e78852ac0d40ab33
2015-09-14 18:26:42 -07:00
Winson fa56b3f2f1 Requiring key chord to delete icons and folders on the workspace
- Also fixing case where the all apps button to search for more apps
  was not focusable

Bug: 20639227
Change-Id: Ie4d9092e654d3cafc0eb346b3bb744ec3e295e92
2015-09-14 19:47:19 +00:00
Tony Wickham 8a511b9123 Merge "Wallpaper preview parallax matches the actual wallpaper's." into ub-launcher3-burnaby-polish 2015-09-14 18:39:56 +00:00
Winson 7089a4e197 am c0b52fef: Refactoring to ensure item deletion always removes from the DB.
* commit 'c0b52fefbc11531d560359c093484099f9d1298e':
  Refactoring to ensure item deletion always removes from the DB.
2015-09-10 22:03:57 +00:00
Winson c0b52fefbc Refactoring to ensure item deletion always removes from the DB.
- Routing the various places where we call through to delete from
  LauncherModel through Launcher, which will delegate the removal
  of the icon from the workspace, and properly handle the removal
  of all items and their contents from the db.

Bug: 23944119

Change-Id: I022fe2b3e79da16b5af87505c4362490b8422686
2015-09-10 14:55:17 -07:00
Tony Wickham 3e776a87dc Wallpaper preview parallax matches the actual wallpaper's.
Cherry picking the following changes from ub-launcher3-master:
Change-Id: I41c5bbbfdabfeb4e20d77e9b5804842a03211edf
Change-Id: I69afa3f8cc59c77e9c4c25e29e8db8c4beb87462
Change-Id: I82b7ba506d51ee4b3812af5fbdf95d3303b37aef
Change-Id: Id7c2b5483c5535d59be2f8a459ce7788e3c8318a

Bug: 23568800
Change-Id: I343169b9fdc5ceaab3d4b39044627d78b7267868
2015-09-10 11:56:54 -07:00
Tony Wickham 4cab3b550b Find page for widget starting at current page from overview.
Previously the search began with the page that the user
long-pressed to enter the overview, even if they then free-
scrolled to another page before selecting "Widgets."

Change-Id: Ie286f6864c78b573c05dd9d02c1346e17db711a6
2015-09-10 09:16:09 -07:00
Tony Wickham 869306140d When placing a widget, go to a page with enough space.
The search for this page starts at the current one and
continues to the right (on LTR) until a page is found that
can accomodate the widget, taking possible resizing and
reordering into account.

Bug: 11338870
Change-Id: I2e9a310eb8f74024dca9150f55a525e1309c2f07
2015-09-09 17:08:50 -07:00
Tony Wickham 29d853c2dd Make sure all overlay panels are visible as user free scrolls.
Previously there was a workaround to ensure that adjacent panels were visible
while in the overview or spring-loaded states, but it incorrectly kept only
those original pages visible even while the user scrolled to other pages. So now
we only use the workaround when first entering the overview or spring-loaded
states, and then fall back to the default getVisiblePages() implementation in
PageView when in free scoll mode.

Bug: 23766408
Change-Id: I692ec00b9cd6d7889c374aee41b85abd0a5d8d3c
2015-09-09 09:25:51 -07:00
Sunny Goyal 2c18c8e34d am 606726ba: Merge "Preventing null pointer crash when opening a folder" into ub-launcher3-burnaby
* commit '606726ba289583a67188d9448b220c2e3fae87d7':
  Preventing null pointer crash when opening a folder
2015-09-03 17:18:33 +00:00
Sunny Goyal a75053f5f9 Preventing null pointer crash when opening a folder
Bug: 23770713
Change-Id: I3ce82450358f1493f70639d594e1e3f391945437
2015-09-03 09:48:50 -07:00
Sunny Goyal f4f89ef608 Using context.getString for getting formatted strings, as it works better with different locales
Change-Id: I9639bb11197e656c5cdd3a4d63f913edcc0987cb
2015-09-02 22:15:29 +00:00
Tony Wickham 785f7a59d3 Previews in the wallpaper picker are offset to match the homescreen parallax.
When "Wallpapers" is selected from the overlay, the current wallpaper parallax
offset is sent to the WallpaperPickerActivity as an Intent extra. The CropView
then uses that offset when previewing new wallpapers to ensure the preview looks
exactly the same as the actual wallpaper will when set.

Note that this fix doesn't seem to work for DefaultWallpaperInfo - that will
come in a future CL.

Bug: 23568800
Change-Id: I41c5bbbfdabfeb4e20d77e9b5804842a03211edf
2015-09-02 20:55:19 +00:00
Sunny Goyal e2fd14b9f6 Jailing the saved instance state of all the dynamically generated views
Using itemId instead of generating a new id for each item. This is because
if the process gets killed, View.generateId will get reset but we will still
receive the generated item id map in onRestoreInstance. This will cause
conflicts with newly generated item ids.

We wrap all the generated homescreen views inside a single sparse array. This
ensures that we do not cause any conflict with dynamically generated views in
other parts of the UI.

Change-Id: I6fe69c2e1dd463402f51222715fae31b9d4dd240
2015-08-27 17:53:28 -07:00
Sunny Goyal 756cd26592 General code refactoring
> Removing utility method for isAttachedToWindow
  > Moving logic to calculate cell size from workspace to DeviceProfile
  > Replacing some constants with xml resource variables
  > Saving the item info using content values for better compatibility with other methods

Change-Id: Idd612633d97a6241cb31148df9466031374bd5a0
2015-08-20 12:56:58 -07:00
Vadim Tryshev 04540ca9e6 Merge "Moving drag-drop related code into a separate package." into ub-launcher3-master 2015-08-20 18:10:39 +00:00
Vadim Tryshev fedca43d39 Moving drag-drop related code into a separate package.
This is per an earlier CR comment "we should probably move all this code to its own package (launcher3.dragndrop) in a separate cl".

I'm not moving DragSource because it's referred from gsa code.

Bug: 22609426
Change-Id: Ia7204dab99c0c395c66b77143a2d60411153f5f3
2015-08-20 07:45:57 -07:00
Sunny Goyal ecf9bf4613 resolved conflicts for merge of 63aa4653 to ub-launcher3-master
Change-Id: I9fb7e452fdc646dc3d764d61d92755fa43edfa65
2015-08-19 14:16:41 -07:00
Sunny Goyal 4b17147c28 Updating logic for setting wallpaper desired size
> Only setting desired size on wallpaper change for pre kitkat
  > Removing wallpaper change receiver from manifest
  > Removing multi-process wallpaper shared prefs for kitkat+

Bug: 23353784
Change-Id: Iba72d32871ee50b75807e2284a73a691bcddc472
2015-08-19 12:59:29 -07:00
Sunny Goyal 7c3cccf427 Fixing empty screen created at the end, even when dragging the last item on the last screen.
Change-Id: If0d4faf0ca15e71facb6ed2fd81ed6a589527836
2015-08-18 18:49:08 -07:00
Sunny Goyal c268148f06 resolved conflicts for merge of 9fc953b9 to ub-launcher3-master
Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
2015-08-17 14:43:41 -07:00
Sunny Goyal 9fc953b94d Version code cleanup
> Renaming Lmp to Lollipop
  > Lollipop_MR1 instead of directly using 22
  > Using M APIs directly instead of reflection

Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
2015-08-17 13:26:01 -07:00
Sunny Goyal 106bf64f4a Some cleanup around drag and drop
> Instead of resizing the rect for dragoutline in onDrow, store the resized rect itself
 > Remove unnecessary inverse matrix calculation

Change-Id: If13c3c5aaecba5a1d3a4f5d39199ed82e9662c62
2015-08-13 16:54:58 -07:00
Vadim Tryshev cc436d5d95 Fixing crash upon cancellation of an accessible drag.
This fixes perhaps an old bug.

If we started an accessible drag for an only item on a page,
then uninstalled the app while dragging, the page was removed
without unsetting its accessibility delegate. Later, the system asks
the delegate to do something, but the drag is over, and some pointers
are null, so everything crashes.

Fixing this.

Bug: 22028725
Change-Id: I85adcd42ae896603634994e20a7790792f7e84b1
(cherry picked from commit de1e67c388)
2015-08-12 00:50:35 +00:00
Vadim Tryshev d209f9e4e9 Merge "Fixing crash upon cancellation of an accessible drag." into ub-launcher3-master 2015-08-11 23:34:27 +00:00
Vadim Tryshev de1e67c388 Fixing crash upon cancellation of an accessible drag.
This fixes perhaps an old bug.

If we started an accessible drag for an only item on a page,
then uninstalled the app while dragging, the page was removed
without unsetting its accessibility delegate. Later, the system asks
the delegate to do something, but the drag is over, and some pointers
are null, so everything crashes.

Fixing this.

Bug: 22028725
Change-Id: I85adcd42ae896603634994e20a7790792f7e84b1
2015-08-11 16:21:04 -07:00
Sunny Goyal 3759d1bc59 am b0d868f7: Merge "Preventing zoom-in animation from running everytime the app updates." into ub-launcher3-burnaby
* commit 'b0d868f73037e0f732fa71d4bf557d4fcb1ed36c':
  Preventing zoom-in animation from running everytime the app updates.
2015-08-11 22:48:00 +00:00
Sunny Goyal 3fcab663a1 Preventing zoom-in animation from running everytime the app updates.
Bug: 22557455
Change-Id: I3ac1212a2f319397cd18be8f4452047d974312b8
2015-08-11 15:18:02 -07:00
Winson 2a87fe8c41 resolved conflicts for merge of 0ad33066 to ub-launcher3-master
Change-Id: I5dbbaaf9fb03ed3003174154ea7d7dbae9048a70
2015-08-07 10:37:21 -07:00
Winson Chung 0ad3306684 Merge "Refactoring search bar animations." into ub-launcher3-burnaby 2015-08-05 19:21:03 +00:00
Winson Chung 006ee269ba Refactoring search bar animations.
- This refactoring ensures that LauncherStateTransition does not
  do its own animation on the QSB, and that all animations to the
  SearchDropTargetBar go through its own animators.

Bug: 22515084

Change-Id: Ia7d13c44d861eac7517076b52a9651a90911ed0a
2015-08-05 12:04:06 -07:00
Sunny Goyal f9ada46270 am 317698bd: Loading high resolution icons for first 3 items in a folder
* commit '317698bd012c1930b83bb4e2e47ac9e363fa6c6a':
  Loading high resolution icons for first 3 items in a folder
2015-08-04 18:09:20 +00:00
Sunny Goyal 317698bd01 Loading high resolution icons for first 3 items in a folder
> Sometimes a folder gets rearranged, without updating the model,
   like when an app in uninstalled. In that case, we need to update
   the icons for folder items, which were previously hidden

Bug: 22813360
Change-Id: I99754911c969bf2153efb2948c226c1c69219b88
2015-08-04 11:05:15 -07:00
Sunny Goyal 488d4bdf26 resolved conflicts for merge of c451da70 to ub-launcher3-master
Change-Id: I738fa16f82b3f3f1f6c63c5d1ce81347ade6467a
2015-08-04 10:26:12 -07:00
Sunny Goyal 912bdfcffa Replacing exception with a log, when uninstalling an app leads to an illegal state
Bug: 22491055
Change-Id: Iaf5fe20b717102bdb0a5442dcc33efea30c50d47
2015-08-03 19:31:17 -07:00
Sunny Goyal 6eeab68fd4 Fixing drag outline positions for folder over hotseat
Bug: 22506247
Change-Id: Ia2508307554089205fd678987454e81cb811a59b
(cherry picked from commit 92bce43164)
2015-08-03 17:19:37 +00:00
Winson Chung 687ae8483d am 946609f0: Merge "Fixing overview mode scale calculations." into ub-launcher3-burnaby
* commit '946609f0ea70e1361dbe979af0e054d4c18b929b':
  Fixing overview mode scale calculations.
2015-07-28 22:54:51 +00:00
Sunny Goyal 5e758cae9a Merge "Changing the dogfood check to a static boolean to better handle proguard optimizations" into ub-launcher3-master 2015-07-28 19:37:00 +00:00
Sunny Goyal 92bce43164 Fixing drag outline positions for folder over hotseat
Change-Id: Ia2508307554089205fd678987454e81cb811a59b
2015-07-16 15:08:41 -07:00
Sunny Goyal 6c56c68555 Changing the dogfood check to a static boolean to better handle proguard optimizations
Change-Id: I892b88ce1a007fafc23a73ad4193c5c4aa411d1b
2015-07-16 14:09:53 -07:00
Winson Chung 4f7eb4077e Fixing overview mode scale calculations.
- Making the overview scale apply just like the spring loaded scale factor
- Tweaking overview scale to make it not so small

Change-Id: If93bac08609b0cfd9c9d9f8f6057498957378b56
2015-07-10 18:23:08 -07:00
Sunny Goyal 3f99a1440e Merge "Fixing screen jump when going to spring_loaded mode in rtl" into ub-launcher3-master 2015-07-10 23:43:54 +00:00
Sunny Goyal 6d5fd2aee8 am 4a0df755: Merge "Computing the visible cell layout area without using the current scroll" into ub-launcher3-burnaby
* commit '4a0df755161c65e2d24299aeaf7408b2e97036d3':
  Computing the visible cell layout area without using the current scroll
2015-07-09 17:19:38 +00:00
Sunny Goyal ce5a7e5ee4 Fixing screen jump when going to spring_loaded mode in rtl
> Removing call to snapToScreen when changing state
> Marking adjacent pages visible in overview and spring_loaded mode, so that they get drawn atleast once.

Change-Id: If305e0d4cfa63bac03f301d69017da55f89155bd
2015-07-09 10:17:46 -07:00
Sunny Goyal 41d8417678 Computing the visible cell layout area without using the current scroll
Bug: 22358433
Change-Id: Ib79d02156b6bfab831fa659637f6113a7f555ba7
2015-07-09 10:13:36 -07:00
Sunny Goyal cf25b52763 Removing some unused PagedView attributes
Change-Id: I1c7312b46ec95286d8e49d3dee60b1bf4d98dc20
2015-07-09 10:06:31 -07:00
Sunny Goyal 3a56edb0ea Merge "Refactoring ItemInfo" into ub-launcher3-master 2015-07-07 06:06:59 +00:00
Sunny Goyal f89aa3579a Hiding workspace from accessibility when its not visible
Bug: 22234780
Change-Id: Ie91ec59c3c3abb26fdf40466ea8173c78acb320f
2015-07-06 17:20:24 -07:00
Sunny Goyal aa8ef119f1 Refactoring ItemInfo
> Changing dragObject to ItemInfo
> Removing dropPos which is always null
> Removing requiresDbUpdate which is only used in CellLayout

Change-Id: I753ddaae0880c8a9bfee5a1266095ff34610284a
2015-06-30 10:26:49 -07:00
Sunny Goyal 4d113a5ff4 Using material style overscroll effect for workspace and folders
Bug: 21335369
Change-Id: I53cc6edfa87334b9326f1dedd90c3e2222beade5
2015-06-19 19:53:34 +00:00