Commit Graph

5647 Commits

Author SHA1 Message Date
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 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
Tony Wickham def6e474da Use promisedIntent instead of intent when deep shortcuts are restored.
This ensures that the intent has the package corresponding to the
shortcut publisher, rather than a market intent. It also ensures that
the intent has the EXTRA_SHORTCUT_ID attached.

Bug: 31123204

Change-Id: I05d56396b629880322e915f52bfc0605b921b0b1
(cherry picked from commit fc02c1b446)
2016-08-30 00:09:11 +00:00
Sunny Goyal d70ef24233 Fixing the hotseat import logic
The import logic following the behavior: Improt everything and force
run GridMigrationTask to automatically remove broken icons.
This logic would fail for hotseat as the replacement happens before
the GridMigrationTask, which will not replace the broken targets
appropriately

The cl changes some logic only for hotseat import
> After import remove any broken icons/empty folders
> When adding default icons, only add as much icons as required. Since
GridMigrationTask uses weights, it sometimes removes imported icon, if
the hotseat size becomes too large.

Bug: 30909630
Change-Id: I6ca1f25dac81649794d81aaf82c3c38d1c918d91
2016-08-24 11:31:13 -07:00
Sunny Goyal 92cb84d4e5 Checking for duplicate intent with proper source bounds.
Since we are doing a equality check on the intent, items which already have
the bounds attached to the intent will not get matched, causing duplicate
icons

Bug: 27176189
Change-Id: Ia9ed9120b04e9c234304995aed13777a5773119e
(cherry picked from commit cbfe71dba3)
2016-08-24 00:46:01 +00:00
Tony Wickham ef0c537925 Cancel hotseat color animator before setting a new color.
There was a race condition that caused the new color to not be
applied. For example, here's how the hotseat would become transparent:
1 Launcher is loaded for the first time; as such, there is not yet a
  color defined for the hotseat, so we start animating to the provided
  default (Color.TRANSPARENT). Meanwhile we start the color extraction.
2 When the color extraction finishes, we set the hotseat to the new
  color. However, if launcher is paused at the time (perhaps some
  retail mode content is showing), then we don't animate the change.
3 If 2 happens before the animation in 1 is complete, the color from
  2 will be overriden by subsequent animation frames and thus the
  hotseat remains transparent until the wallpaper changes.

Bug: 30956221
Change-Id: Iddf72379b0162f1b32883ad26ce267473e172849
2016-08-22 15:23:01 -07:00
Sunny Goyal 6fbdc09e1c Merge "Updating version check to use SDK_INT" into ub-launcher3-calgary 2016-08-16 02:44:51 +00:00
Sunny Goyal a9206128a2 Updating version check to use SDK_INT
Change-Id: Idb46053e7304bc8d0cab03a17a6fe73013e4f092
2016-08-15 19:35:22 -07:00
Hyunyoung Song 5a17fe6ca0 [DO NOT MERGE] Set launch source target correctly for user event logging
Before, everything is set to APP_ICON
With this changed, pinned shortcuts are set to DEEPSHORTCUT

Change-Id: I3e17de63f58693525236290ef5cb1f909f1d6098
(cherry picked from commit 8ce6063c4a)
2016-08-16 00:40:26 +00:00
Tony Wickham e8882f7d27 Merge "Ignore clicks on shortcuts' drag handles." into ub-launcher3-calgary 2016-08-15 22:52:56 +00:00
Tony Wickham e04a07f6ac Ignore clicks on shortcuts' drag handles.
When touching down within the drag handle's bounds, we remove the
onClickListener temporarily (restored when touching down outside
of the drag handle's bounds). Long clicks still start the drag.

Also increased drag threshold from 12dp to 16dp.

Bug: 30816665

Change-Id: I0b33dc34bf95c0532376f2f7cf50865fa50093de
2016-08-15 14:02:08 -07:00
Hyunyoung Song 650cd2377b Merge "Log shortcuts open on ACTION_UP instead of in showForIcon()." into ub-launcher3-calgary 2016-08-12 20:31:13 +00:00
Tony Wickham be06874c81 Log shortcuts open on ACTION_UP instead of in showForIcon().
- We only want to log when the container is opened and potentially
  used, not when a long press is followed by a drag-and-drop.
- Also cleaned up code that was determining the container of the
  app icon, since LaunchSourceProvider.fillInLaunchSourceData()
  can do that instead (it's more robust and consistent).

Bug: 30791570
Change-Id: I05b6750f26182fda8a9940ac66f1371c2d228ca9
2016-08-10 18:26:41 -07:00
Sunny Goyal 6eac7881d4 Merge "Reloading workspace when the shortcuts permission changes" into ub-launcher3-calgary 2016-08-11 00:01:47 +00:00
Sunny Goyal 95f3d6ba2c Reloading workspace when the shortcuts permission changes
> Check for permission on every onResume
> If the permission is different than last known permission,
reload and rebind workspace.

Bug: 30789422
Change-Id: Idfa445815e29e2336505779545507d106b33a253
2016-08-10 17:00:15 -07:00
Tony Wickham 1ba0e4df79 Merge "Change drag from shortcuts to say "Cancel" instead of "Remove"" into ub-launcher3-calgary 2016-08-09 21:52:43 +00:00
Tony Wickham df64e9ee06 Change drag from shortcuts to say "Cancel" instead of "Remove"
Bug: 30757836
Change-Id: I7d2d97898bd1feac3cd7ba15614c29a1e1b33841
2016-08-09 11:07:46 -07:00
Tony Wickham ea5bcba847 Merge "Make padding consistent between shortcuts and the app icon." into ub-launcher3-calgary 2016-08-08 21:03:29 +00:00
Sunny Goyal 5f06401807 Fixing potential ConcurrentModificationException
mBgDeepShortcutMap is only accessed on the background thread. But
the same instance of list of values was getting passed to the UI
thread, instead of being cloned.

Change-Id: Ie7d0442d895304489ce9323ea872b9091d668ae5
2016-08-08 10:13:33 -07:00
Hyunyoung Song 96c56b3607 Merge "Pull down should work on search box, even if all apps scroll is not at top. b/30295305" into ub-launcher3-calgary 2016-08-05 21:13:08 +00:00
Hyunyoung Song 58a9c4b7d2 Pull down should work on search box, even if all apps scroll is not at top.
b/30295305

Change-Id: I38bbe47d6e33929c550930c9f157c58fbea203ef
2016-08-05 13:57:21 -07:00
Hyunyoung Song 9323bdbb2a Merge "Fix hotseat flicker when opened all apps in landscape, rotate screen, pull down" into ub-launcher3-calgary 2016-08-05 18:33:13 +00:00
Tony Wickham 988e2b7a4d Make padding consistent between shortcuts and the app icon.
This change makes the padding consistent regardless of where the app
is (e.g. folder vs workspace vs all apps) by ignoring the app's
padding and adding our own to the shortcuts container.

Also note that this padding is relative to the icon, excluding the
text beneath it. So we also hide the text when the container opens
downwards, and re-show it when the container closes.

Bug: 30604007
Change-Id: I6e51c4983a8b5d495833f86e483ebaa229ed2099
2016-08-05 11:17:42 -07:00
Hyunyoung Song 0472d496ea Merge "Change NavBar to transparent black b/30615471" into ub-launcher3-calgary 2016-08-05 18:02:14 +00:00
Hyunyoung Song 4ebc3d070f Change NavBar to transparent black
b/30615471

Change-Id: I7885e8a7fd63ee10c9b0107087046730e8acfde9
2016-08-05 10:59:17 -07:00
Tony Wickham 4efffc5ba6 Use shortcut disabled message if available.
Bug: 30681210
Change-Id: Ibb5fd58e5fc9557b63730bc1e3c3977133769466
2016-08-05 10:40:12 -07:00
Hyunyoung Song d7d740287f Fix hotseat flicker when opened all apps in landscape, rotate screen, pull down
b/30595452

Change-Id: Ib634ffbc509c6b16ac58c184ccbca15ae936be14
2016-08-04 15:48:42 -07:00
Tony Wickham 960a7fe15e Merge "Reset mActiveController to null in DragLayer.onInterceptTouchEvent()." into ub-launcher3-calgary 2016-08-04 21:09:29 +00:00
Sunny Goyal 50941fb8a6 Adding support for updating the pinned shortcuts without updating
the ID map

Bug: 30654182
Change-Id: I30082bd87466a29b7bafe1e8cbf1446e1d1e4f3e
2016-08-04 12:32:11 -07:00
Tony Wickham 98cbd62e1f Reset mActiveController to null in DragLayer.onInterceptTouchEvent().
Otherwise the previous active controller will continue to handle touch
events even if it doesn't re-intercept future touches. For instance,
All Apps was handling the swipe gesture after DragLayer intercepted to
close a shortcuts container, which led to the weird behavior described
in the bug.

Bug: 30590854
Change-Id: I247b39b03d336a04659f6ce644380bf3cef8de3f
2016-08-04 11:52:18 -07:00
Winson 45a11dd9ee Prevent refreshing app search results with empty query.
- Any change to the TextView text will cause mQuery to be set,
  which will cause a new search next time refreshSearchResult
  is called.  We should also be checking there if it is a valid
  search query before starting a new search.

Bug: 30606307
Change-Id: I08640c56199211f2aeea2386fcf699810853ab58
2016-08-03 18:01:10 -07:00
Hyunyoung Song 5a5eb846c4 Merge "Change interpolation logic to all apps transitioning on fling b/30486958" into ub-launcher3-calgary 2016-08-03 22:28:30 +00:00
Hyunyoung Song 191e9d1b29 Change interpolation logic to all apps transitioning on fling
b/30486958

Cleaning up/refactoring this CL will be done in polish branch.

Change-Id: Ib51633a1e1cb79f58b505f835053ef238ae1bdec
2016-08-03 15:14:43 -07:00
Sunny Goyal 40a29161ae Merge "Disabling accessibility focus on all children when shortcuts is open" into ub-launcher3-calgary 2016-08-03 20:19:41 +00:00
Tony Wickham f0cb6018dd Merge "Start shortcuts close animation where open left off." into ub-launcher3-calgary 2016-08-03 20:09:44 +00:00
Hyunyoung Song 9407db1e11 Merge "Fix disco bounce crash b/30413641" into ub-launcher3-calgary 2016-08-03 17:42:48 +00:00
Hyunyoung Song e688e1e6c8 Fix disco bounce crash
b/30413641

Change-Id: Icb2f3f11024daa78c3f59cab8c773091b9481feb
2016-08-03 10:40:18 -07:00
Sunny Goyal 7d552c8b18 Disabling accessibility focus on all children when shortcuts is open
Bug: 30611791
Change-Id: Ibb1dec13b62add3799c215fea98e87e3fa89638d
2016-08-03 10:32:23 -07:00
Peter Schiller e6fe1b5947 Simpler caret
Bug: 30527159
Change-Id: I674de149e613c7adb567a13a288baa9877d36112
2016-08-02 17:54:18 -07:00
Sunny Goyal a659bfe3d2 Updating content description for the shortcuts menu and announcing
it when the container is opened

Bug: 30587453
Change-Id: I6f2d3ba05593f3e2a1a8f05c66a0f80e76932c38
2016-08-02 16:16:16 -07:00
Hyunyoung Song b9b54efd59 Merge "Add container velocity for all apps to be used by the caret" into ub-launcher3-calgary 2016-08-02 20:36:17 +00:00
Hyunyoung Song 5b6470679e Add container velocity for all apps to be used by the caret
Change-Id: I03479d53eb7203ab4a0515e2bf68b917dfb81f23
2016-08-02 13:31:22 -07:00
Winson Chung f7296c373a Merge "Adding workaround to jump in wallpaper offsets." into ub-launcher3-calgary 2016-08-02 20:01:32 +00:00
Winson 5bc2827488 Adding workaround to jump in wallpaper offsets.
- Just skip the animation if we are animating to the same wallpaper 
  offset (which is the case when we are adding from all apps)

Bug: 28587903
Change-Id: Ib7b1828c1b099a665d68c22cb33ee62693f33f35
2016-08-02 12:04:05 -07:00
Tony Wickham 278958e922 Merge "Always cancel forwarding on ACTION_UP or ACTION_CANCEL." into ub-launcher3-calgary 2016-08-02 18:10:00 +00:00