Commit Graph

78507 Commits

Author SHA1 Message Date
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
Sunny Goyal f4d017999a Moving getWallpaperArrayResourceId to a separate functions, so that
it can be overriden by dependent projects

Change-Id: I565d85d9126e41cec3dd2cdb8f2c75283bce4b13
2015-08-31 13:39:25 -07:00
Sunny Goyal 7f9e00a4c8 Merge "Refactoring wallpaper picker activity" into ub-launcher3-master 2015-08-31 19:45:34 +00:00
Sunny Goyal e4c28f8e13 Refactoring wallpaper picker activity
> Moving different tiles to individual classes
  > Moving some utility methods to corresponding tile classes
  > No functionality change

Change-Id: I493cf309f4e3d817a9300be004c475d208f8dadb
2015-08-31 12:36:54 -07:00
Sunny Goyal cc818d0ad5 Merge "Jailing the saved instance state of all the dynamically generated views" into ub-launcher3-master 2015-08-31 18:59:55 +00:00
Sunny Goyal 5fc78a7d03 Merge "Regression in ag/753709" into ub-launcher3-master 2015-08-31 18:50:10 +00:00
Sunny Goyal de51d1d1af Regression in ag/753709
Item values were not read properly in savedInstanceState

Change-Id: If45b7085555076b03ebd4a97a3ff939487ca8ce1
2015-08-31 11:48:24 -07:00
Winson Chung e2824c4ea7 am 1b247d9f: Merge "Adding workaround for regression caused by ag/752175" into ub-launcher3-burnaby
* commit '1b247d9f37cd1e9ca9e8c690c137858b66314b79':
  Adding workaround for regression caused by ag/752175
2015-08-31 18:47:01 +00:00
Winson Chung 1b247d9f37 Merge "Adding workaround for regression caused by ag/752175" into ub-launcher3-burnaby 2015-08-31 18:40:41 +00:00
Winson 16615f29f6 Adding workaround for regression caused by ag/752175
Change-Id: I92617c88f17a5827454e147f93d822975587d5b4
2015-08-31 11:32:38 -07:00
Sunny Goyal edf329a5c3 Adding gradle script for Android Studio
Change-Id: I640c63e2981337eb8c8ed191b40c0649a986361e
2015-08-30 21:04:44 -07:00
Tony Wickham 1ea392f0bc Fix typos caused by gerrit's inline editor.
Change-Id: Ie142f5c6b418ac775cc167787f8e372d5354b91a
2015-08-28 16:33:11 -07:00
Tony Wickham 415146fcf3 Merge "Reuse existing temporary wallpaper tiles when selecting same photo." into ub-launcher3-master 2015-08-28 23:21:37 +00:00
Tony Wickham f970ee5cdc 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
2015-08-28 23:06:01 +00:00
Winson Chung c306c9873a am 8b0af4c6: Merge "Override the overscroll color for the widget rows." into ub-launcher3-burnaby
* commit '8b0af4c635a116dea90555dd60cc23444dab3e64':
  Override the overscroll color for the widget rows.
2015-08-28 21:20:33 +00:00
Sunny Goyal c10c014a09 am 066bcc05: Merge "Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app" into ub-launcher3-burnaby
* commit '066bcc05fb97843dab518e0bc70ae766ed3edf28':
  Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app
2015-08-28 21:20:30 +00:00
Winson Chung 3eefff8d77 am 0947f5c2: Merge "Adding graphic for all apps empty search screen." into ub-launcher3-burnaby
* commit '0947f5c26804bc74b8f1242d856c1f703544c3de':
  Adding graphic for all apps empty search screen.
2015-08-28 21:20:28 +00:00
Winson Chung 8b0af4c635 Merge "Override the overscroll color for the widget rows." into ub-launcher3-burnaby 2015-08-28 21:17:36 +00:00
Sunny Goyal 066bcc05fb Merge "Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app" into ub-launcher3-burnaby 2015-08-28 21:16:03 +00:00