Commit Graph

16456 Commits

Author SHA1 Message Date
Sunny Goyal 93f878c168 Fixing the loader to bind the first screen as well as the hotseat together
When the loader ran for the first time (or when called due to force-reload),
it was binding with page = -1 (invalid pageId is -1001). This was causing loader
to assume the workspace to be on a valid screen, and causing the loader to
only bind the hotseat first.

Bug: 27705838
Change-Id: Ia8eb2543d8cee1268256b2d6bccf33828937c54a
2016-03-30 18:24:07 -07:00
Sunny Goyal 144154d435 No need to differentiate package event into app or updated based on
a package is being updated or not

Package update handling is a super set of package add handling  which
also updates the all-apps and package disabled state.
This also prevents addtion of a home screen icon when a managed profile
app on SD card become available.

Bug: 27877926
Change-Id: I9264e422fd30b94ce6ebb2e5adea820b3cda3063
2016-03-30 16:51:12 -07:00
Tony Wickham 855b1b5fff Add distance threshold for dragged items before accepted by targets.
With the new spring-loaded workspace, items are often very close to
button drop targets (e.g. App Info) at the start of a drag. This
threshold makes it less likely to accidentally drop on a target.

Bug: 24099531
Change-Id: I4912ceeb0b63958816177c7bde073e825176d987
2016-03-29 12:41:14 -07:00
Tony Wickham 1f5d3ccc25 Merge "Invalidate scrim throughout animation from overlay to workspace." into ub-launcher3-calgary 2016-03-29 00:02:45 +00:00
Adam Cohen 11b644d6e1 Remove default app suggestions from LauncherExtension
Change-Id: I7c3a1465aaa54ad3b988975810f29ce89e650ec1
2016-03-28 16:43:33 -07:00
Tony Wickham 3f6c0ee7f5 Invalidate scrim throughout animation from overlay to workspace.
Bug: 27135377
Change-Id: I19e947ac271063beaa6c5d11906631d0afcbb781
2016-03-28 16:43:20 -07:00
Adam Cohen 1ad3ef3e81 Fix alignment issue with suggested apps in all apps
-> New RecyclerView handles wrap_content differently
-> Add mock set of suggested apps to the LauncherExtension

issue: 27581978
Change-Id: Id080e212e0425515fa66e821d116b95284bb3526
2016-03-28 15:51:25 -07:00
Sunny Goyal a0088a5106 Merge "Fix restoring of layer type" into ub-launcher3-calgary 2016-03-28 22:50:06 +00:00
Dmitry Kalita 814ed9ab77 Fix restoring of layer type
Change-Id: I1233b846247b270644325c0ad0229a23bfb29040
Signed-off-by: Dmitry Kalita <rusmonster@gmail.com>
2016-03-28 15:48:36 -07:00
Annie Chin d2877b9bdb Merge "Introduce IconProvider." into ub-launcher3-calgary 2016-03-28 21:26:46 +00:00
Annie Chin 17f85951a5 Introduce IconProvider.
Bug: 27506625

-Move managing of SystemState to IconProvider

Change-Id: I3417f0b7d0664c2255c7cc2a88f6c65822b5fb98
2016-03-28 14:07:22 -07:00
Sunny Goyal e4eaa0e983 Merge "Defining separate layouts for horizontal and vertical drop target bars instead of chaning the layouts in DeviceProfile" into ub-launcher3-calgary 2016-03-28 19:30:35 +00:00
Tony Wickham 676e29ce5d Merge "Added copywrite comments to pinch-related classes." into ub-launcher3-calgary 2016-03-25 15:46:20 +00:00
Sunny Goyal f37a21412a Defining separate layouts for horizontal and vertical drop target bars
instead of chaning the layouts in DeviceProfile

Bug: 27721989
Change-Id: I9a22c21e643f4fd0058c9be5e9d705aaf7649204
2016-03-24 17:29:23 -07:00
Sunny Goyal ed268c2c89 Preventing unnecessary object creations
> Only creating the animator when required
> Canceling a previously running animation when starting a new one
> Directly setting LinearInterpolator instead of using null

Change-Id: I4f5f25f26dfed9b5c78665af4e74dd565b4cd805
2016-03-24 15:31:13 -07:00
Sunny Goyal 17763cb1d2 Fixing debug log
Change-Id: I85c1f7707a3ea9cae2701aa781b74d758602f643
2016-03-24 13:58:35 -07:00
Sunny Goyal 225071b627 Merge "Embedding the icon pixel size in the cache DB version. This causes the cache to get reset when the icon size changes, for eg, in case of display scale changes" into ub-launcher3-calgary 2016-03-24 20:40:21 +00:00
Sunny Goyal 07a2f13471 Merge "Instead of reloading the launcher, updating items dynamically when Quiet mode changes" into ub-launcher3-calgary 2016-03-24 19:20:14 +00:00
Sunny Goyal da891c1a22 Instead of reloading the launcher, updating items dynamically when
Quiet mode changes

Bug: 27632028,27763316
Change-Id: I55f018e855448df0abcbf4fd0fcb39344594980c
2016-03-24 12:19:29 -07:00
Sunny Goyal 784f9c3996 Setting stable layout flags on the launcher, so that the instets do not
change for launcher when going in/out of another app

Bug: 27600678
Change-Id: Ic873faba99c539025769d911bc7b0a4fed629cd7
2016-03-23 16:56:54 -07:00
Sunny Goyal abb584cee1 Merge "Fixing wrong preference file name in LauncherFiles" into ub-launcher3-calgary 2016-03-23 23:17:23 +00:00
Sunny Goyal 8a6edce064 Fixing wrong preference file name in LauncherFiles
Bug: 27778623
Change-Id: I28aa6698d3caa1fc11b2e8df0733143865f9b408
2016-03-23 10:47:15 -07:00
Tony Wickham 9c43182ff1 Add FeatureFlags.LAUNCHER3_DISABLE_PINCH_TO_OVERVIEW
Bug: 27796974
Change-Id: Icda33fb62783cc3f7b510d627d1eeb9cf29bd2d3
2016-03-23 10:42:02 -07:00
Sunny Goyal 2ae7736d09 Embedding the icon pixel size in the cache DB version.
This causes the cache to get reset when the icon size changes,
for eg, in case of display scale changes

Bug: 27701193
Change-Id: Ib11144757a93cb50fb233d855902c0b2c15afbed
2016-03-22 14:34:16 -07:00
Sunny Goyal d5bd67dfa9 Adding support for result callback when starting uninstall-application activity
Change-Id: Ieaca4fbd0ae0156f24c8863ccbef61d4d6d30ba1
2016-03-22 13:57:58 -07:00
Adam Cohen d3cc05a3a8 Account for disparity btw folder preview size and drawable size
-> When there is disparity between the cached icon size and the available space
   in the preview, the folder preview could appear not as intended (either
   overly crammed, or overly spacious)

issue 27701193

Change-Id: I9f97012ba569d1419b1e3f661cd26761b2a36285
2016-03-21 15:12:15 -07:00
Adam Cohen aa2542a461 Invalidate folder drawing paramaters when top padding changes
-> This fixes issues when moving folders between the workspace
   and hotseat (which have different top paddings)

Change-Id: Iac5a4575a403ce8eadd1d3195f02ab10fe5dac23
2016-03-21 14:08:54 -07:00
Sunny Goyal 470f900fce Removing some unused imports
Change-Id: I83962e467e3357db536a3e5a4a5c3071cc1268ab
2016-03-21 13:02:29 -07:00
Tony Wickham f7106648db Merge "Center folders slightly less aggressively than before" into ub-launcher3-calgary 2016-03-21 18:57:45 +00:00
Sunny Goyal ef0ac88e0b Merge "Removing dependency on wallpaper size settings from launcher" into ub-launcher3-calgary 2016-03-21 18:32:41 +00:00
Sunny Goyal b46b150410 Merge "Deleting the unrestored widget id synchronously" into ub-launcher3-calgary 2016-03-19 15:50:18 +00:00
Sunny Goyal f305520808 Merge "Fixing broken instrumentation tests when run from command line" into ub-launcher3-calgary 2016-03-19 00:52:41 +00:00
Sunny Goyal 7eab3cc374 Fixing broken instrumentation tests when run from command line
Change-Id: I923cdbaaaf18c9b765d1e70122b92cd2c1621e06
2016-03-18 17:48:53 -07:00
Adam Cohen 82fa92011b Center folders slightly less aggressively than before
-> Some slight changes in spacing showed that we were centering
   folders a bit too eagerly
-> Once there is less than a ~4x delta between the spacing on the left
   vs. the right of the folder, center it.

issue 27671587

Change-Id: Ic2861ab375d9b9e4cf0eeb28b683073246f35c97
2016-03-18 17:42:48 -07:00
Sunny Goyal 047317735c Deleting the unrestored widget id synchronously
> We are making the DB call (IO) on the UI thread which is costlier than
the AppWidgetHost call.
> The process can get killed after the broadcast receiver returns, which
can prevent these ids from getting deleted.

Change-Id: I47746cf03d0eae573b6baa25cde9e573fd1f1a60
2016-03-18 16:29:08 -07:00
Sunny Goyal 3bbbabc54a Fixing model being updated on UI thread
> When package gets unavailable or suspended, the disabled flag was getting
updated on the UI thread. This could lead to inconsistent model if launcher
activity didn't exist.
> Fixing: When unsuspending one work profile apps, all work profile apps get
unsuspended

Bug: 27673573,27673373,27403236
Change-Id: I7fde3f79c36204e73ca66ccf8431fa0f0cce3d08
2016-03-18 15:13:28 -07:00
Sunny Goyal b8f00da8de Merge "Removing dependency on LauncherCallbacks for getting the search bounds" into ub-launcher3-calgary 2016-03-18 20:19:34 +00:00
Sunny Goyal 4ddc40130a Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfo
In PackageItemInfo,, using the user of the first item in the sub-list

Bug: 27585511
Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
2016-03-18 11:06:01 -07:00
Sunny Goyal 6f866095c0 Removing dependency on wallpaper size settings from launcher
> Moving wallpaper desired width calculation to xml

Bug: 14470153
Change-Id: I8803af158861507a40e5d55e9aa6d515be47eefa
2016-03-17 17:04:37 -07:00
Tony Wickham 1743ac4691 Added copywrite comments to pinch-related classes.
Maybe we should write a script that checks that this is present in
all our files? I didn't do a thorough check, but wouldn't be surprised
if others were missing.

Change-Id: I4777ff618f952b9b11fde60ebc8d897cf6449032
2016-03-17 19:17:34 +00:00
Sunny Goyal 05c8c57fa7 Removing dependency on LauncherCallbacks for getting the search bounds
> Instead of handling insets in BaseContainerView, directly applying
  them to margins, as that scpace can't be used for scroll handling
> Appliying the top and bottom padding in xml
> The left & right padding is defied in xml which is reused for scroll
  handling

Bug: 27108154
Change-Id: Ia32e6d5e8fd1bfafb1d77d1244ce2268e4da9df9
2016-03-17 11:57:39 -07:00
Sunny Goyal 1bc8fc3de2 Merge "Creating database without localized collators on NYC and above" into ub-launcher3-calgary 2016-03-17 18:40:33 +00:00
Sunny Goyal bf67f3b184 Creating database without localized collators on NYC and above
Android automatically creates and maintains a metaData table to
store the current device locale. This is used when fetching
sorted results. Since Laucher does not require string based
sorting on its tables, we can avoid unnecessary IO by disabling
this feature

Bug: 24608776
Change-Id: I8bbf5ca3abd505be95a85cfc99dd0438966575e9
2016-03-17 11:40:04 -07:00
Tony Wickham c5b31965d9 Don't listen for the pinch gesture if the workspace is locked.
Bug: 27639653
Change-Id: I1f3b324a4b95cc5deaa2513dcbf4ed5a158a4866
2016-03-16 16:28:21 -07:00
Tony Wickham 95cdb3a021 Remove scrim on highlighted spring-loaded panel.
Bug: 27135377
Change-Id: I470955ed082a45ae7dc5f8fdd1f3decb2b573dbc
2016-03-16 11:09:09 -07:00
Sunny Goyal 16466f1bbb Adding UI tests for various bind widget flows
Change-Id: I634302051886baee6b6424f69bc95db860b4823e
2016-03-15 15:34:25 -07:00
Sunny Goyal 44d0b5355d Closing folder in onSaveInstanceState
folderInfo.isOpened is part of static model, where is the open folder
state is part of the UI. This resets the static model, when the
UI is about to be reset
This also causes the folders to get closed when launcher gets hidden

Partial revert of: Ie1318b82b497957b99603b11ec338dd50d51b962

Bug: 27596291, 24900496, 27624924
Change-Id: I30c2bb99a19fdd95a1b997d07066f80be812e2c0
2016-03-15 09:44:49 -07:00
Hyunyoung Song 109daead4d Merge "Fix widget tray clipping due to wrong padding" into ub-launcher3-calgary 2016-03-14 18:02:47 +00:00
Hyunyoung Song 58e61ac216 Fix widget tray clipping due to wrong padding
b/27380335
padding was set wrong when the widget view hierarchy was
being refactored in this CL: ag/870011

Change-Id: I003634acded2bbe204098c0e6fefff13d154b5d6
2016-03-14 11:00:07 -07:00
Sunny Goyal 499bbfa2ef Fixing black lowres icons
Bug: 27598858
Change-Id: Ib7c9b1e3abe54b94741e154bc8327d06f83e439c
2016-03-10 19:53:05 -08:00