Commit Graph

16456 Commits

Author SHA1 Message Date
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 82ac82fb17 Merge "When placing a widget, go to a page with enough space." into ub-launcher3-master 2015-09-10 00:31:18 +00: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
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
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 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
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
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
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
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 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 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
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
Winson Chung 0947f5c268 Merge "Adding graphic for all apps empty search screen." into ub-launcher3-burnaby 2015-08-28 21:08:49 +00:00
Winson fee206f241 Adding graphic for all apps empty search screen.
Change-Id: I976a327a5984790c458b0f36d33c0b1ac16ec59c
2015-08-28 12:34:55 -07:00
Sunny Goyal a8b244e5b8 Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app
Bug: 23515512
Change-Id: I60678eccd4b60225ff30960f7197d633f72c7659
2015-08-28 10:27:41 -07: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