1026 Commits

Author SHA1 Message Date
Sunny Goyal
8ac727b2c6 Using custom threadpool executor instead of the one defined in AsyncTask
Change-Id: I8fe95d932c5de14c74f0576bfc3d1f641d12b448
2015-09-23 15:39:14 -07:00
Sunny Goyal
0abb36f692 Fixing overscroll effect when the navigation bar is opaque
The navigation bar is opaque on mobile devices in landscape mode.
Launcher should ignore the right insets and draw the edge effect appropriately.
Also draw the black bar under the navigation bar, just in case we assume it
to be opaque, but it was not actually opaque.

Bug: 18526657
Change-Id: I1d49dcb82b8a5ee25009bc738cd9b8c0c5c88263
2015-09-22 10:57:08 -07:00
Adam Cohen
3c9c7263dc am 9ae42fff: am b3fff9d9: Merge "Cleanup some incorrect / noisey calls to CustomContentCallbacks#onShow / onHide" into ub-launcher3-burnaby
* commit '9ae42fff6f481ea2a06f171da43f630ded313b69':
  Cleanup some incorrect / noisey calls to CustomContentCallbacks#onShow / onHide
2015-09-21 17:44:54 +00:00
Adam Cohen
9ae42fff6f am b3fff9d9: Merge "Cleanup some incorrect / noisey calls to CustomContentCallbacks#onShow / onHide" into ub-launcher3-burnaby
* commit 'b3fff9d98a3e3c886d4efa912d7ad6753dd7ec9c':
  Cleanup some incorrect / noisey calls to CustomContentCallbacks#onShow / onHide
2015-09-21 17:40:50 +00:00
Adam Cohen
b3fff9d98a Merge "Cleanup some incorrect / noisey calls to CustomContentCallbacks#onShow / onHide" into ub-launcher3-burnaby 2015-09-21 17:34:05 +00:00
Adam Cohen
4b66bf3cff Cleanup some incorrect / noisey calls to CustomContentCallbacks#onShow / onHide
-> In some instances, onResume would incorrectly call onShow
-> When pressing Home from CustomContent, we'd get a sequence of onHide,
   onShow, and then onHide due to some deferred actions in onNewIntent.
   Got rid of the onShow.

issue 17629011

Change-Id: I9b4f2ef682f5a7060e68210866fa05452076e428
2015-09-18 17:32:00 -07:00
Tony Wickham
2516428710 Drags originating in Folder exit spring loaded mode when completed.
Change-Id: Id020473a7a466fa98897455f48d3de7a3bc4997d
2015-09-18 15:30:24 -07:00
Tony Wickham
6ed058cb6b 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
(cherry picked from commit 3e776a87dc)
2015-09-18 13:09:01 -07:00
Winson Chung
26bfdd9d5a am a3c9fb12: Merge "Requiring key chord to delete icons and folders on the workspace" into ub-launcher3-burnaby-polish
* commit 'a3c9fb125c7449df5add990e91e0e3471e3cc776':
  Requiring key chord to delete icons and folders on the workspace
2015-09-18 18:53:48 +00:00
Winson Chung
a3c9fb125c Merge "Requiring key chord to delete icons and folders on the workspace" into ub-launcher3-burnaby-polish 2015-09-18 18:49:25 +00:00
Sunny Goyal
b3cf2d789e Merge "Refactoring deferred bind logic" into ub-launcher3-master 2015-09-18 17:18:10 +00:00
Tony Wickham
34d2c915c4 Added AppInfoDropTargetBar to spring loaded workspace.
Change-Id: Ieedc68eba9a5934ab30d6d546d8a837274491064
2015-09-15 11:37:58 -07:00
Sunny Goyal
527c7d3460 Refactoring deferred bind logic
> Using ViewTreeObserver to listen for onDraw instead of overriding onDraw in workspace
> Loader passes the list of deferrerd runnables to launcher

Change-Id: Ie4877f746c96e9497396de8089f00f70bf867e17
2015-09-15 10:43:13 -07:00
Tony Wickham
e33c09f1be Merge "Initial spring loaded workspace." into ub-launcher3-master 2015-09-15 17:32:31 +00:00
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