Commit Graph

5738 Commits

Author SHA1 Message Date
Jon Miranda 488d8adeb8 Use ContextCompat.getColor to support API levels below 23.
Found while debugging on Lollipop.

Change-Id: Ibe97fd30c4ee8cd0c1735a41802b859345f9e931
2016-09-15 15:05:12 -07:00
Sunny Goyal 9784572c47 Adding support for extending the touch target in the touchDelegate
am: 1cc48e1d0c

Change-Id: I29ce4b52a2b687f73b2db4ddb633210e905aad69
2016-09-15 21:33:10 +00:00
Sunny Goyal 1cc48e1d0c Adding support for extending the touch target in the touchDelegate
Bug: 31458312
Change-Id: Ic819bdede2776ff63ec17053cc1326415edc1ca0
2016-09-15 13:37:13 -07:00
Jon Miranda 3f9d6278e3 Fix bug where page indicator animation repeats itself.
Bug: 31501865
Change-Id: I0df77859b82b60fd0e50023e0f5690961850cf6c
2016-09-15 12:40:18 -07:00
Hyunyoung Song 46133612b4 Pull down should start search.
b/31458165

Change-Id: If4821e3d89a05a00551af6a5209ebc1693a1389b
2016-09-15 10:48:25 -07:00
Sunny Goyal 6f28e71e94 Simplifying the startSearch call in launcher callbacks
Change-Id: I722e110903cced237f05667c4d711468d7cd3daa
2016-09-13 14:22:31 -07:00
Sunny Goyal d139b0aa7d Adding support for multiwindow drag and drop
Change-Id: I95b46e3c3f1238307d3ef5a6c81a8e530ba0987a
2016-09-12 14:37:46 -07:00
Sunny Goyal 1e35fbbac7 Merge "Using DragObject for folder drop instead of maintaining states when drag starts from inside a folder" into ub-launcher3-calgary-polish 2016-09-12 20:21:04 +00:00
Sunny Goyal 0cf3265bd0 Merge "Fixing double system state call in iconCache" into ub-launcher3-calgary-polish 2016-09-12 18:10:29 +00:00
Sunny Goyal 9c41f94b5b Merge "Adding support for searching word segments when camelcase is used in the title" into ub-launcher3-calgary-polish 2016-09-12 18:09:49 +00:00
Sunny Goyal fd47652574 Fixing double system state call in iconCache
Change-Id: I6d43c8054c18e199f4343662f92631f0808c773e
2016-09-11 14:49:18 -07:00
Sunny Goyal e4a3e0cfaf Adding support for searching word segments when camelcase is used in the title
Bug: 30880421
Change-Id: If642d24408fe0e80b5a0dd9a2a57d2f3c2d92ea9
2016-09-09 18:11:35 -07:00
Sunny Goyal e393d3af36 Using DragObject for folder drop instead of maintaining states when
drag starts from inside a folder

Change-Id: I073b59c194d0bd483d579bbcb638b116b09590a0
2016-09-09 17:25:38 -07:00
Sunny Goyal acd0c4204b Merge "Preventing a shortcut which requires permissions from being added to homescreen" into ub-launcher3-calgary-polish 2016-09-10 00:04:51 +00:00
Hyunyoung Song 915d56abc7 Merge "Show IME when search query != null after rotation" into ub-launcher3-calgary-polish 2016-09-09 22:13:33 +00:00
Hyunyoung Song c2fe1147f9 Show IME when search query != null after rotation
Change-Id: Ia35fba140a5addc21bf347cd63b72dc4e357421e
2016-09-09 15:02:20 -07:00
TreeHugger Robot 40851b637e Merge "Fix deferred shortcut container removal." into ub-launcher3-calgary-polish 2016-09-09 00:02:39 +00:00
TreeHugger Robot eafe9291c5 Merge "Don't show app info for ITEM_TYPE_SHORTCUT." into ub-launcher3-calgary-polish 2016-09-09 00:02:35 +00:00
Tony Wickham 252f0a3321 Don't show app info for ITEM_TYPE_SHORTCUT.
Bug: 30440566
Change-Id: I77b101331ea249c633be9f7df1edebefa7b9e0a8
2016-09-08 15:00:24 -07:00
Sunny Goyal fb5096d07b Preventing a shortcut which requires permissions from being added to
homescreen

A shortcut can be added by any app as INSTALL_SHORTCUT is a normal
level permission. But the intent is actually launched by the launcher
app which can have other permission as well.

> When adding a shortcut from the broadcast, verify that the intent does
not require any permission
> When adding a shortcut using the two-step drop process, verify that
the source app also has the permission to create such a shortcut

Bug: 30778130
Change-Id: I710a490d69019dc25709db5a97020c20d9325007
2016-09-08 14:41:01 -07:00
Sunny Goyal add78abb98 Merge "Launcher restore state fixes:" into ub-launcher3-calgary-polish 2016-09-08 21:30:45 +00:00
Tony Wickham ec383dfc63 Fix deferred shortcut container removal.
- Previously, the drag listener listener was removed from the
  container as soon as it started animating closed, which got
  rid of its opportunity to complete the deferred removal.
- The deferred removal now calls close(), which does further
  cleanup including updating the app icon's text visibility.

Bug: 31248681
Change-Id: I18e545e7e19e50b7d47e23a5beb8f254ba1a4ccf
2016-09-08 13:58:35 -07:00
Sunny Goyal b2dbc56568 Merge "Updating the assets for the all-apps search background." into ub-launcher3-calgary-polish 2016-09-08 20:16:49 +00:00
Sunny Goyal 57b4006d52 Updating the assets for the all-apps search background.
Bug: 30309105
Change-Id: I4dd4a97ff49fd3c6dd386f100ca35dfb629044df
2016-09-08 12:57:11 -07:00
Tony Wickham 285c76dded Merge "Add outline to shortcuts when focused." into ub-launcher3-calgary-polish 2016-09-08 17:04:40 +00:00
Tony Wickham 8dd5168b05 Add outline to shortcuts when focused.
Bug: 30563273
Change-Id: Ia54c112dcf91c225588b7388001eb93ee5c03171
2016-09-07 18:20:21 -07:00
Sunny Goyal 27d10940d2 Merge "Preventing concurrentmodification exception when dragging a icon with shortcuts from inside a folder" into ub-launcher3-calgary-polish 2016-09-07 21:48:50 +00:00
Hyunyoung Song da1c17c492 Change all apps caret target bounding box
b/30400751

1) This also fixes the issue of apps drawer sliding up when page is swiped
horizontally immediately above the hotseat area.

2) Disclaimer: this should be cp'ed to calgary.
Hence, I tried to keep the diff small. Ideally, CaretDrawable animation
handling should move to AllAppsHandleImageView via refactoring in
follow up CL.

Change-Id: I4d808ee2eeca53b40c0b4e4e0e364fef056e26c3
(cherry picked from commit 016eaeea99)
2016-09-07 21:46:21 +00:00
Hyunyoung Song 5f4d130d87 Merge "Change all apps caret target bounding box b/30400751" into ub-launcher3-calgary-polish 2016-09-07 21:46:04 +00:00
Hyunyoung Song 016eaeea99 Change all apps caret target bounding box
b/30400751

1) This also fixes the issue of apps drawer sliding up when page is swiped
horizontally immediately above the hotseat area.

2) Disclaimer: this should be cp'ed to calgary.
Hence, I tried to keep the diff small. Ideally, CaretDrawable animation
handling should move to AllAppsHandleImageView via refactoring in
follow up CL.

Change-Id: I4d808ee2eeca53b40c0b4e4e0e364fef056e26c3
2016-09-07 14:45:09 -07:00
Sunny Goyal d0d495f508 Preventing concurrentmodification exception when dragging a icon
with shortcuts from inside a folder

When dragging the icon, DeepShortcutContainer removes itself as a
dragListener causing the exception

Change-Id: Ifb2b4a3045caa54aa0b6a9b525055ffdcfaa04a6
2016-09-07 14:40:46 -07:00
Sunny Goyal 2100c78bd9 Launcher restore state fixes:
> Creating PendingRequestArgs to store generic request info across
activity instances
> Storing the CALL_PHONE request in PendingRequestArgs

> Handling onActivityResult only after the workspace has loaded.
onActivityResult sometimes modifies launcher db when removing empty
screens, and any add action is also deferred until bindComplete.
This simplifies this logic.

> Always binding the restored page irrespective of pending result.
Before starting a request activity (bind widget permission, or
widget config activity or shortcut picker), workspace commits the
pending screen id to the DB. Hence the restore page is valid when
restore is called (onResume loads with currentPage instead of
restored page)

Bug: 28573143
Change-Id: I34be603cbeb2145f5caf0d18e016f50029e07df8
2016-09-06 15:24:36 -07:00
Hyunyoung Song 551e5abfe1 Support user event logging for drag and drop
b/30039490

Supported in this CL:
- DnD: drag from container [WORKSPACE|HOTSEAT|FOLDER|ALLAPPS|WIDGETS|DEEPSHORTCUTS]
       drag to container [HOTSEAT,WORKSPACE,FOLDER,DROPTARGETS]
- Source and target can be [FOLDER_ICON, ICON, DEEPSHORTCUT, WIDGET]
- $ adb shell setprop log.tag.UserEvent DEBUG will turn on debugging

Change-Id: I0b8b879b80e6dce85bbde6e7794f9e0677832603
(cherry picked from commit 59a238095e)
2016-09-04 19:48:24 +00:00
Sunny Goyal 6ff1ef17a2 Removing some reflection code
Change-Id: I8a0a707d69999e5f9911e7d8df7d4a659b3dfb8f
(cherry picked from commit e2ec8a3cd5)
2016-09-02 19:29:51 +00:00
Sunny Goyal f2d363f670 Merge "Some optimizations in blur outline generator" into ub-launcher3-calgary-polish 2016-09-02 19:15:59 +00:00
Sunny Goyal 171fbdbc10 Merge "Blocking alpha animation if the initial and final state for the animation are both 0" into ub-launcher3-calgary 2016-09-02 19:14:55 +00:00
Sunny Goyal dbbb1fee90 Merge "Bug fix in Alarm where it was not getting called correctly if the new timeout was set that was smaller than the previously set timeout" into ub-launcher3-calgary 2016-09-02 19:14:39 +00:00
Sunny Goyal d9033f3ae1 Merge "Fixing broken accessibility drag" into ub-launcher3-calgary 2016-09-02 19:13:56 +00:00
Sunny Goyal 7bc4b5bcd4 Merge "Fixing overlay scroll state not getting reset properly when scrolling is was cancelled" into ub-launcher3-calgary 2016-09-02 19:13:06 +00:00
Sunny Goyal 6f2bb1ada5 Bug fix in Alarm where it was not getting called correctly if the
new timeout was set that was smaller than the previously set timeout

> Using uptimeMillis in Alarm to avoid errors due to system time
changes
> Adding an extra check in Wait in case Thread.sleep eats up
all the timeout

Change-Id: Id1fac5e8fdb81a0c3c7a6a5e50586b2a2f180d06
(cherry picked from commit a2125e1d10)
2016-09-02 18:28:20 +00:00
Sunny Goyal 9be9936653 Fixing broken accessibility drag
> Allow touch events on hotseat while in accessible drag as drag now
happens in spring loaded state.
> Allow drop target buttons to ignore thershold check when in
accessibility drag

Bug: 30900444
Change-Id: I88274367983fc027b2ddde3a719ca943f4f48587
(cherry picked from commit 4583d09c05)
2016-09-02 18:26:33 +00:00
Hyunyoung Song 6cf1e0f36b Landscape container padding update.
b/30021487

Change-Id: I179825eba09f3c4c57175e8f6da49708dae1931c
(cherry picked from commit 9d96fd5790)
2016-09-02 18:24:58 +00:00
Sunny Goyal f28e6afafd Some optimizations in blur outline generator
1) Using ALPHA_8 as the start and end bitmap. This removes one extra
   bitmap generation step
2) Using ByteBuffer on ALPHA_8 bitmap for clipAlpha. This allows us
   to use byteArray instead of intArray for representing pixels

Change-Id: I1b654c439fd491b6b91180ddc562bb97fad857aa
2016-09-02 11:23:49 -07:00
Sunny Goyal 538b54c467 Fixing overlay scroll state not getting reset properly when
scrolling is was cancelled

Bug: 30834333
Change-Id: I3605cd2dd939057905d297b5a25ce8669d578125
(cherry picked from commit 4ff424abf9)
2016-09-02 18:12:48 +00:00
Sunny Goyal 62e7518359 Blocking alpha animation if the initial and final state for the animation
are both 0

Bug: 30739854
Change-Id: I4f7c579dc3f64a4fed60d7b2f8ecd5f359e165ec
(cherry picked from commit bf206123a8)
2016-09-02 18:11:38 +00:00
Sunny Goyal 52851aa3fd Fixing topView not being considered in all places when calculating accessible
and focusable views

Bug: 30563273
Change-Id: I6253ce33ee5c328efdde2ea733029975b31e5eb8
2016-09-02 10:52:07 -07:00
Sunny Goyal 94b510cc68 Some drag and drop code refactor:
1) Adding DragOptions to easily extend drap functionality
2) Changing onDragStarted signature to send more information
3) Updating states for dropTargetButton based on drag event directly
4) Removing folder item based on onDragStarted and not startDrag

Change-Id: I65b684e092ddc081d086bfe2c8c1973ed170eaeb
2016-09-01 15:55:13 -07:00
Hyunyoung Song 61bcfba335 Merge "Support user event logging for drag and drop b/30039490" into ub-launcher3-calgary-polish 2016-09-01 21:51:25 +00:00
Hyunyoung Song 59a238095e Support user event logging for drag and drop
b/30039490

Supported in this CL:
- DnD: drag from container [WORKSPACE|HOTSEAT|FOLDER|ALLAPPS|WIDGETS|DEEPSHORTCUTS]
       drag to container [HOTSEAT,WORKSPACE,FOLDER,DROPTARGETS]
- Source and target can be [FOLDER_ICON, ICON, DEEPSHORTCUT, WIDGET]
- $ adb shell setprop log.tag.UserEvent DEBUG will turn on debugging

Change-Id: I0b8b879b80e6dce85bbde6e7794f9e0677832603
2016-09-01 12:47:12 -07:00
Sunny Goyal 3cc2d8b3dd Merge "Removing some reflection code" into ub-launcher3-calgary-polish 2016-09-01 18:48:28 +00:00