Commit Graph

49925 Commits

Author SHA1 Message Date
Tony Wickham 3d3f90b2f0 am 489fc56d: Don\'t repeat ReorderPreviewAnimation for folders/widgets in power save mode.
* commit '489fc56df80293f107fe706b19456edab10b9872':
  Don't repeat ReorderPreviewAnimation for folders/widgets in power save mode.
2015-09-10 00:12:25 +00:00
Winson b9cc38031c resolved conflicts for 12688552 to ub-launcher3-master
Change-Id: Iaf97c5ae486e19cd3ad320ed88346571252d878a
2015-09-09 17:11:29 -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
Sunny Goyal 1c3dc4cf4d am 64704663: am 606726ba: Merge "Preventing null pointer crash when opening a folder" into ub-launcher3-burnaby
* commit '647046637efc2b7414b15062cc650cb690c01f46':
2015-09-10 00:08:14 +00:00
Ivan Lee 2996d6a6e6 am f96b1ad2: am 667d6888: Revert workaround for move to default screen on home intent.
* commit 'f96b1ad27f1a27bd8ab0cedd35aff2dbf2495a33':
2015-09-10 00:08:13 +00:00
Winson Chung 09e9a383de am 4aa48517: Merge "Disabling fast scroller when searching apps." into ub-launcher3-burnaby-polish
* commit '4aa48517df32d35a1ae3b48bd02acc087c247351':
  Disabling fast scroller when searching apps.
2015-09-10 00:08:12 +00:00
Winson 10612a7146 Merge commit '5c6bdbbc27525acc8c49cea6a1de36723a13fac7' into manual_merge_5c6bdbbc
Change-Id: I508bce36edca28ed565338e5173b64eba14e89d4
2015-09-09 17:06:09 -07:00
Tony Wickham 57a0e98a7d Merge "Make sure all overlay panels are visible as user free scrolls." into ub-launcher3-master 2015-09-09 21:57:49 +00:00
Sunny Goyal ac7a174402 am 4abaf133: Merge "Removing items which are on invalid screen" into ub-launcher3-burnaby
* commit '4abaf133546b0c950edc82594985e9da50d9c1dd':
  Removing items which are on invalid screen
2015-09-09 17:07:57 +00:00
Sunny Goyal 4cffb0c466 am c74e4197: Restoring provider behavior for reloading app on old devices > For older devices, launcher will only reload in case of inserts with specific query parameters > For older devices, launcehr will notify content observers of any internal inserts > Chani
* commit 'c74e41973a74aa416e16aeadaa2f491153da26bc':
  Restoring provider behavior for reloading app on old devices   > For older devices, launcher will only reload in case of inserts with specific query parameters   > For older devices, launcehr will notify content observers of any internal inserts   > Chaning TAG for Launcher provider as max logging tag is only 23 characters
2015-09-09 17:07:57 +00:00
Sunny Goyal 01251b0dc4 am 4abaf133: Merge "Removing items which are on invalid screen" into ub-launcher3-burnaby
* commit '4abaf133546b0c950edc82594985e9da50d9c1dd':
  Removing items which are on invalid screen
2015-09-09 17:07:52 +00:00
Sunny Goyal e5745e9d02 am c74e4197: Restoring provider behavior for reloading app on old devices > For older devices, launcher will only reload in case of inserts with specific query parameters > For older devices, launcehr will notify content observers of any internal inserts > Chani
* commit 'c74e41973a74aa416e16aeadaa2f491153da26bc':
  Restoring provider behavior for reloading app on old devices   > For older devices, launcher will only reload in case of inserts with specific query parameters   > For older devices, launcehr will notify content observers of any internal inserts   > Chaning TAG for Launcher provider as max logging tag is only 23 characters
2015-09-09 17:07:51 +00:00
Sunny Goyal 4abaf13354 Merge "Removing items which are on invalid screen" into ub-launcher3-burnaby 2015-09-09 17:05:11 +00:00
Sunny Goyal c74e41973a Restoring provider behavior for reloading app on old devices
> For older devices, launcher will only reload in case of inserts with specific query parameters
  > For older devices, launcehr will notify content observers of any internal inserts
  > Chaning TAG for Launcher provider as max logging tag is only 23 characters

Bug: 23821706
Change-Id: I32891387612d967c41ddae848c43dc4b1de1b0e9
2015-09-09 09:38:52 -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
Tony Wickham 86fb399309 Fade from wallpaper picker activity back to homescreen.
If a wallpaper preview is going to look exactly the same as the actual wallpaper
on the homescreen page that is being returned to, fading looks much nicer than
the default activity exit animation.

Bug: 23568800
Change-Id: Id7c2b5483c5535d59be2f8a459ce7788e3c8318a
2015-09-08 18:24:58 -07:00
Tony Wickham b894aa1f67 Fix typos caused by gerrit's inline editor.
Change-Id: Ie142f5c6b418ac775cc167787f8e372d5354b91a
(cherry picked from commit 1ea392f0bc)
2015-09-04 22:34:09 +00:00
Sunny Goyal 41cdc8d20a Removing items which are on invalid screen
Bug: 23804751
Change-Id: If26a6b201aa6127cfd2a08fc4b408a27d6329bad
2015-09-04 15:26:17 -07:00
Tony Wickham 388a657419 Merge "Long-clicking workspace overlay buttons does the same thing as clicking them." into ub-launcher3-burnaby-polish 2015-09-04 22:18:38 +00:00
Tony Wickham 1336070b2a Merge "Reuse existing temporary wallpaper tiles when selecting same photo." into ub-launcher3-burnaby-polish 2015-09-04 22:18:16 +00:00
Tony Wickham aebd9fde89 Reuse existing temporary wallpaper tiles when selecting same photo.
Previously, if you selected a photo to set as the wallpaper multiple times, it
kept adding temporary wallpaper tiles that were all identical. Now it reuses the
same tile, updating the thumbnail and wallpaper if the Uri happens to point to a
new image (such as if a photo is renamed).

Change-Id: Ib05c9db4e1fd17226b503174f25add3368158b11
(cherry picked from commit f970ee5cdc)
2015-09-04 22:07:38 +00:00
Tony Wickham 489fc56df8 Don't repeat ReorderPreviewAnimation for folders/widgets in power save mode.
Since power save mode (introduced in Lollipop, also known as battery saver)
disables animations, the ReorderPreviewAnimation looks bad - instead of
displaced folders subtly and smoothly moving up and down, they violently jump
between up and down positions in rapid succession. Setting the animation to not
repeat in this case avoids this issue.

Bug: 23675090
Change-Id: I8149610af75e7023dca28a942b3447228083cd33
(cherry picked from commit 9e0702f4af)
2015-09-04 21:57:25 +00:00
Tony Wickham 6b7653d37f Long-clicking workspace overlay buttons does the same thing as clicking them.
Bug: 15000525
Change-Id: I4123863de888989ad6171cb43001c3ad86c19edb
(cherry picked from commit c75917f129)
2015-09-04 21:53:17 +00:00
Winson 1268855200 Compressing Launcher resources.
Bug: 23812987

Change-Id: I66452a321c3c48661387282ba782ba948e0aae6b
2015-09-04 19:53:21 +00:00
Tony Wickham 8010486e8b Adjust the wallpaper preview parallax according to the crop that will be saved.
To get the crop, the wallpaper is first scaled down as much as possible (i.e.
until either the width or height matches that of the device screen), then a
center crop is performed (the excess width or height is chopped off). The
preview's parallax was previously incorrect if the width was the victim of this
cropping, because in that case the parallax started and ended at a different
point than in the actual wallpaper. This is fixed by adjusting the parallax of
the preview to match the final crop.

The end result is that all wallpaper previews match the actual wallpaper upon
setting, except for the default wallpaper because it follows a different flow.

Bug: 23568800
Change-Id: I82b7ba506d51ee4b3812af5fbdf95d3303b37aef
2015-09-04 12:42:57 -07:00
Sunny Goyal 647046637e 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-04 17:14:46 +00:00
Ivan Lee f96b1ad27f am 667d6888: Revert workaround for move to default screen on home intent.
* commit '667d6888f4a7f1a6267c1968f22fdb8ff3af8d34':
  Revert workaround for move to default screen on home intent.
2015-09-04 17:14:46 +00:00
Winson Chung 4aa48517df Merge "Disabling fast scroller when searching apps." into ub-launcher3-burnaby-polish 2015-09-03 21:07:24 +00:00
Winson 5c6bdbbc27 Fixing regression, reset AllApps when the screen turns off.
- Now that we are debouncing the workspace state, we were no longer resetting
  the all apps view when the screen turns off when the user is already on the
  workspace.

Bug: 23759455
Change-Id: I996b595945de96ae6ff2344349027d4722921984
2015-09-03 12:15:32 -07:00
Winson 646c236ad2 Disabling fast scroller when searching apps.
- There is no meaningful order for the app search results since they are ranked.

Bug: 23759082
Change-Id: I0aa4eea68136ea3ecef2a80b20ba7b0d46f0653b
2015-09-03 18:49:43 +00:00
Tony Wickham 01649e3481 Merge "Change addParallaxOffset() to setParallaxOffset() in CropView." into ub-launcher3-master 2015-09-03 18:12:28 +00: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
Ivan Lee 6398b88e89 am 667d6888: Revert workaround for move to default screen on home intent.
* commit '667d6888f4a7f1a6267c1968f22fdb8ff3af8d34':
  Revert workaround for move to default screen on home intent.
2015-09-03 17:18:30 +00:00
Sunny Goyal 606726ba28 Merge "Preventing null pointer crash when opening a folder" into ub-launcher3-burnaby 2015-09-03 17:12:36 +00:00
Tony Wickham 4dbaef0246 Change addParallaxOffset() to setParallaxOffset() in CropView.
This is less prone to error, because calling setParallaxOffset() multiple times
will always lead to the same result. Plus, this works regardless of whether
moveToLeft() was called first.

While the parallax offset ensures that previews of built-in wallpapers match
the actual wallpaper you get upon saving, it does not work in all cases.
Specifically, it does not work for a couple (1 or 2 on the devices I've tested)
of the larger built-in wallpapers. However, this seems to be due to a mismatch
between the size of the preview wallpaper and the actual wallpaper (the latter
is larger). This sounds like a separate bug.

Bug: 23568800
Change-Id: I69afa3f8cc59c77e9c4c25e29e8db8c4beb87462
2015-09-03 09:52:55 -07: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
Ivan Lee 667d6888f4 Revert workaround for move to default screen on home intent.
BUG=23556755

Change-Id: Ia268a58389b90fd0503e474f02f33a312c051c0e
2015-09-03 10:16:07 -06:00
Tony Wickham c75917f129 Long-clicking workspace overlay buttons does the same thing as clicking them.
Bug: 15000525
Change-Id: I4123863de888989ad6171cb43001c3ad86c19edb
2015-09-02 16:59:19 -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 9e0702f4af Don't repeat ReorderPreviewAnimation for folders/widgets in power save mode.
Since power save mode (introduced in Lollipop, also known as battery saver)
disables animations, the ReorderPreviewAnimation looks bad - instead of
displaced folders subtly and smoothly moving up and down, they violently jump
between up and down positions in rapid succession. Setting the animation to not
repeat in this case avoids this issue.

Bug: 23675090
Change-Id: I8149610af75e7023dca28a942b3447228083cd33
2015-09-02 15:06:00 -07: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 009a724ca2 Merge "Loading default wallpaper on the background thread" into ub-launcher3-master 2015-09-01 18:06:37 +00:00
Sunny Goyal fd169ab17b Loading default wallpaper on the background thread
Bug: 23353784
Change-Id: Ia64cfd6b8065fb3d589e32af12e0e0bf5242a43a
2015-09-01 10:59:47 -07:00
Sunny Goyal 77fcebe850 Fixing crash when picking an external image
Change-Id: I98654000e82fd7e96152785ceafe857724fc417f
2015-09-01 10:13:39 -07:00
Sunny Goyal b9d7ff7ecb am 7412c3cb: Merge "Adding gradle script for Android Studio" into ub-launcher3-burnaby
* commit '7412c3cb005c3b3315ddb276386e2115f742d2e0':
  Adding gradle script for Android Studio
2015-09-01 00:20:13 +00:00
Sunny Goyal 7412c3cb00 Merge "Adding gradle script for Android Studio" into ub-launcher3-burnaby 2015-09-01 00:15:53 +00:00
Winson Chung 747f2b66e8 am fdc8eb61: Merge "Fixing NPE in recycler view scroll bar." into ub-launcher3-burnaby
* commit 'fdc8eb61a417af22dac8bc97dd5f19f728c80060':
  Fixing NPE in recycler view scroll bar.
2015-08-31 22:18:49 +00:00
Winson Chung fdc8eb61a4 Merge "Fixing NPE in recycler view scroll bar." into ub-launcher3-burnaby 2015-08-31 22:08:41 +00:00
Winson 23c8f48f43 Fixing NPE in recycler view scroll bar.
- The regression was introduced in scroll bar changes ag/751628, but
  unlike AllApps, the WidgetsRecyclerView can have an unbound model.

Bug: 23689784
Change-Id: Ibd3d5bcbafab0ada9a372fa00acaa45809ce720d
2015-08-31 15:02:26 -07:00
Winson 25f3604490 Prevent full sized icons from being stored when low-res icons are requested.
- When LauncherModel loads for the first time, the full set of widget package
  icons are loaded, which loads and stores full resolution icons even if low-res
  icons are requested.  This CL ensures that if we query for package icons, the
  low res icon is returned if it is requested, only loading the high-res icons
  when the user goes into the widgets tray.

Bug: 22797443
Change-Id: I45cd23c302c5e654ba7e0306a4b07b2fbeb70d2b
2015-08-31 14:36:32 -07:00