Commit Graph

16456 Commits

Author SHA1 Message Date
Jon Miranda 83337f9e8e Call close for AbstractFloatingViews that were removed while still open.
I'm not sure how/when this case occurs (perhaps during some transition/state
change), but manually removing the floating view matches the symptoms in the
bug.

Bug: 72996404
Change-Id: I1e7c1a338fcd16c8e07b3c49fb9c9b2097eb2708
2018-04-25 11:25:40 -07:00
TreeHugger Robot ad007ba9f1 Merge "Fix bug where workspace taps were not being sent to WallpaperManager." into ub-launcher3-edmonton 2018-04-24 22:41:33 +00:00
Jon Miranda d2d39cbfc7 Fix bug where workspace taps were not being sent to WallpaperManager.
Bug: 77218814
Change-Id: Ied464f08dce6f96fd3c56aa790f60a2561edcc84
2018-04-24 15:24:21 -07:00
Winson Chung 2d18c688d4 Merge "Send trim memory to trim icon cache when stopped" into ub-launcher3-edmonton 2018-04-24 21:32:22 +00:00
Winson Chung dea51350d6 Send trim memory to trim icon cache when stopped
- Workaround for b/78520668

Bug: 76162466

Change-Id: I2c225c59484984a671186415cb1eb19161f57ba6
2018-04-24 14:07:49 -07:00
Sunny Goyal 8546213d01 Passing stateHandler information to the callback
Bug: 78478167
Bug: 78478567
Change-Id: Ie3334c4473037c31d87bda950239c628e219dc46
2018-04-24 11:40:38 -07:00
TreeHugger Robot 406c08727e Merge "Ensure workspace is still in a valid state when handling long press." into ub-launcher3-edmonton 2018-04-24 16:10:42 +00:00
Jon Miranda ce2c6ebdd9 Ensure workspace is still in a valid state when handling long press.
Bug: 77826453
Change-Id: Iddb62597de0073630aafc95075fb62312524c412
2018-04-23 21:14:11 -07:00
Jon Miranda 5918662f32 Fix bug where scroll position jumps when in overscroll.
When bouncing between top/bottom overscroll, mDistance calculation
allows it to increase without bounds. This solution resets
mDistance to 0 for the edge that is not being overscrolled.

Bug: 78364220
Change-Id: I8371b3aee37e82d40aaa6adc2473a87f2b69931c
2018-04-23 15:51:49 -07:00
Sunny Goyal 0bbacc705c Moving some swipe up complete logic to when the handler is completed.
Bug: 76449024
Change-Id: I136e665495ab7164c79e1dfa0ef61090ba50fc7a
2018-04-23 12:09:22 -07:00
TreeHugger Robot 8b5c7d9315 Merge "Implement all apps discovery bounce." into ub-launcher3-edmonton 2018-04-23 17:36:22 +00:00
Tracy Zhou e5575f9fff Implement all apps discovery bounce.
Mock: https://docs.google.com/presentation/d/1TCp1mREgsFAWq4hCnUaSRCpaqvDbzCVkN1mJuRMylIg/edit#slide=id.g36a3e190fb_0_6

Demo video: go/shelf_bounce_animation

Fixes: 70180942
Test: manual test
Change-Id: I6ecceb63612dd63cea62f2e6cb19d7522f3d76e0
2018-04-23 10:26:40 -07:00
Sunny Goyal d3f717c765 Merge "Fixing flakiness in shape detection" into ub-launcher3-edmonton 2018-04-21 00:48:31 +00:00
TreeHugger Robot bea26c1502 Merge "Fixing preference highlight when opening notification access" into ub-launcher3-edmonton 2018-04-21 00:48:13 +00:00
Winson Chung f23931f915 Reset the force-invisible flag after the animation into launcher completes.
- In the case where an app auto-enters into PiP, we don't run the
  predefined remote animation, which means that the force-invisible flag
  is never reset. With ag/3876550, we can rely on enter animation complete
  to be called after the transition, and we can reset the flag here as well.

Bug: 77730018
Change-Id: Ifa4cbe518047eed7ab327721ff6d17db1a2b8cd5
2018-04-20 16:12:37 -07:00
TreeHugger Robot d39b8755b5 Merge "Force finish any pending animations if the insets or orientation change" into ub-launcher3-edmonton 2018-04-20 21:10:17 +00:00
Sunny Goyal ed2d2bcbb8 Force finish any pending animations if the insets or orientation change
Some animation might be running from a previous orientation, which can cuase property changes
to get skipped.

Bug: 77848165
Bug: 77774619
Change-Id: I3e198196192746abdd72a1970ff2ef407bf4aff9
2018-04-20 20:53:16 +00:00
Sunny Goyal c919a4fa94 Kepping the rotation setting UI always enabled and accessible
Bug: 77654352
Change-Id: Iade9ef33bc70fdbdac9ab39d6fa77113fb21549a
2018-04-20 12:00:43 -07:00
Sunny Goyal 40253329c5 Bringing back auto-rotate settings
Bug: 77654352
Change-Id: I0910fc8afe2fb7e125d57912abc35bbbd5df9d74
2018-04-19 09:27:56 -07:00
Sunny Goyal 6275b0ae7e Fixing flakiness in shape detection
The shape detection logic was setting a transform on the mask path, which
overrides the original transform set by the drawable, which causes it
to give different transforms depending on how many times the method is called.

Bug: 77875383
Change-Id: I3054b8f48ba698a6c7866ed27e1129665b79c447
2018-04-18 16:57:41 -07:00
Sunny Goyal d47f2d26cc Fixing preference highlight when opening notification access
Bug: 77590799
Change-Id: Ife3f9d94cb9c469c6e9e000002c6277d5bf47189
2018-04-18 14:12:06 -07:00
TreeHugger Robot 971a476cb7 Merge "WallpaperManagerCompat: correct build version check" into ub-launcher3-edmonton 2018-04-18 19:01:48 +00:00
TreeHugger Robot 58253eaac8 Merge "Introducing Clear-all button on Overview" into ub-launcher3-edmonton 2018-04-18 18:56:28 +00:00
Jon Miranda 596d7f135d WallpaperManagerCompat: correct build version check
WallpaperManagerCompatVOMR1 is targeting API 27 (O MR1), but the
api guard is checking, if we are running API 26 (O) or above.

Correct the check to prevent using unavailable Wallpaper APIs.

Change-Id: I83cceee8eb61b2d74e647d473d7d560d00be14d3
(cherry picked from commit Iaf510bb79010e640db04adbbc2ee44de9abd6913)
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2018-04-18 11:45:13 -07:00
Vadim Tryshev 6d2321cb7d Introducing Clear-all button on Overview
It’s an initial implementation, i.e. no fancy effects.
It shares a parent (LauncherRecentsViewContainer) with RecentsView.
The button is centered in clear_all_button_container, which gets
positioned programmatically to the right of the last task. (RTL polish
will be a separate CL as well).

Bug: 72222505
Change-Id: Ia912908a93a30c2f51450ccf0f97c7495e7916d5
Test: Manual
2018-04-18 11:33:21 -07:00
Tony Wickham 5c3706c22a Merge "Make sure notification listener stays unbound on reboot when badging disabled" into ub-launcher3-edmonton 2018-04-18 17:12:06 +00:00
Tracy Zhou b67e35337b Reset PIP position when canceling swipe up
onStop() is a confirmed signal of user leaving Launcher. In most use
cases, we use onUserLeaveHint() to move PIP. However, in some cases,
onUserLeaveHint() does not get triggered. It's still a good signal for
those use cases because it happens sooner than onStop() and is not
interrupted by focus change. In order to address cases that
onUserLeaveHint() is not triggered (e.g. cancelling swipe up), onStop()
pushes PIP to the right position. In other cases, we simply set it
twice, which does not hurt.

Change-Id: Ia206590d10d673b16196bbab927a24aaae3ba46b
Fixes: 77648293
Test: manual test
2018-04-17 23:45:47 -07:00
Tony 7aa922c912 Make sure notification listener stays unbound on reboot when badging disabled
We were requesting unbind in onCreate(), but the NotificationListenerService
documentation for requestUnbind() clearly states "The service should wait for the
{@link #onListenerConnected()} event before performing this operation. I know it's
tempting, but you must wait." I was tempted, and I did not wait. :(

The fact that the notification listener was binding even though the setting was off
was not only inefficient, but also had at least one user-visible bug: because
secure settings are set per user, the global badging setting actually only applies
canShowBadge = false for user 0; other users such as work profile still show badges.

Repro steps:
1. Have a work profile
2. Get a notification on work profile app and normal app
3. Turn off global badging setting ("Allow notification dots" from home settings)
4. Reboot the device

In this case, we get onCreate, call requestUnbind() which is ignored since we aren't
bound, then get onBind() and onListenerConnected() etc. Thus the work profile app has
a notification dot and other apps don't.

Bug: 71545493
Change-Id: I7f7dc219b25c28257f8b98fba7e362b99d3cba45
2018-04-17 18:54:10 -07:00
Sunny Goyal ed7a6937cb Unifying and maintaining the text-alpha and text visibility property
Bug: 76228194
Change-Id: I70be5f9fd22c53864a9a0308f256baa7dc1f3ab7
2018-04-17 20:08:10 +00:00
Sunny Goyal de967a2355 Disabling alpha layer on some views
Change-Id: Ide1d5951ea80080f8fea8f32a76487b646b4f958
(cherry picked from commit 2020b20cd9)
2018-04-17 20:01:31 +00:00
Vadim Tryshev a2adac6a91 Removing accessibility description from page indicators
The current page is announced upon switching to it.
Is should be done this way for all future page implementations with
indicators.

Bug: 77827828
Change-Id: I8ba3bd9d068954df51d6de45da79133ede12c96d
Test: Manual
Merged-In: I8f2f163a261dd7098939674d39e014236fc66d5d
2018-04-17 19:52:18 +00:00
Sunny Goyal 3483c52e6b Waiting until onResume before creating the wallpaper-open animation.
Bug: 77853906
Change-Id: I5126855492da59c9dbfef0ce2a97f94662a6522b
2018-04-16 13:01:57 -07:00
TreeHugger Robot 4107c4310a Merge "a11y: disabling accessibility scrolling of the home screen" into ub-launcher3-master 2018-04-13 18:37:57 +00:00
Tony Wickham 00f9712cdd Merge "Ignore null notifications" into ub-launcher3-master 2018-04-13 18:12:05 +00:00
Tony Wickham a6f5869d8f Ignore null notifications
There seems to be an edge case where we can get a null notification in
onNotificationRemoved(); there's nothing actionable about that, so just
ignore it to prevent NPE. Also add null check to onNotificationPosted()
for good measure.

Bug: 69140873
Change-Id: I3586bf435d05aee38b99dffd3d01315b433e8476
2018-04-13 10:57:09 -07:00
Tony Wickham 035a20dee1 Merge "Don't show back button when discovery bounce is playing" into ub-launcher3-master 2018-04-13 17:27:37 +00:00
Tony Wickham df1eb8bb86 Don't show back button when discovery bounce is playing
Bug: 74766552
Change-Id: Ib3b514f4a2bfaa8593b82cd5acb16f02dd09dcc7
2018-04-12 17:26:18 -07:00
Sunny Goyal d754dcd5d9 Only skip the animation, if we are going to the same state
Bug: 77487950
Change-Id: I2d3e376094b0fb0d3120ab6c4d6569f52ab8273f
2018-04-12 14:17:06 -07:00
Sunny Goyal 2998e43256 Merge "Listen for cases where touch controllers change, and update them" into ub-launcher3-master 2018-04-12 00:37:22 +00:00
Tony Wickham a006830f0a Listen for cases where touch controllers change, and update them
Otherwise we'd be stuck using the old touch controllers until DragLayer
is setup again (e.g. launcher is killed).

Bug: 77921826
Change-Id: I8aac6fc453839902cb2d99279a6bd1549ee17d79
2018-04-11 17:25:40 -07:00
Sunny Goyal 7eff40ff2d Several app transition fixes:
> If launcher already started, creating the state transition only after threshold crossed, so that previous animations are not cancelled
> Not posting animaiton callbacks at the front of the queue, as that sometimes causes it get executed before onNewIntent
> Farking the activity as forceInvisible while launching an opaque app, so that quickly pressing home/back runs the reverse animation
> Not running state animations when force-invisible is true

Bug: 77830325
Bug: 77898806
Change-Id: I50a7e915ca35fd6aeb284c8f321ecca74396fe98
2018-04-11 17:08:31 -07:00
TreeHugger Robot e9f31c1014 Merge "Using correct window bounds in multi-window for fallback activity" into ub-launcher3-master 2018-04-11 23:59:16 +00:00
Sunny Goyal 3477804c72 Using correct window bounds in multi-window for fallback activity
Also fixing a bug where insets were not updated when recreating deviceprofile

Bug: 77875376
Change-Id: I7806cf949da415ef171ccf2f4ab3e8f2b7606220
2018-04-11 16:43:18 -07:00
Winson Chung 2cb5bddd1c Merge "Reload the task list when multiwindow mode changes" into ub-launcher3-master 2018-04-11 23:32:29 +00:00
Vadim Tryshev 52b2b43c56 a11y: disabling accessibility scrolling of the home screen
Bug: 77914605
Test: Manual
Change-Id: I5dcfe7479d7239b1f66bd2e805a1aa8978f5ca5b
2018-04-11 13:43:36 -07:00
Winson Chung 1a77c3dce1 Reload the task list when multiwindow mode changes
Bug: 73097187
Change-Id: I05d8635f78451600cbb8a9c03515e60d3c32e1ae
2018-04-11 13:26:21 -07:00
Vadim Tryshev eeaa8ee6c2 a11y: disabling animation for task list swipes
Bug: 77632611
Test: Manual
Change-Id: Ibbfba5f3219d63a5604544eea33422ee91f54c01
2018-04-11 12:23:42 -07:00
Sunny Goyal 82d2074cd2 Merge "Do not reset the previous state animation, if it is a part of the new state animaiton" into ub-launcher3-master 2018-04-10 03:02:02 +00:00
Tony Wickham 97b658f289 Merge "Can now swipe away to dismiss second task" into ub-launcher3-master 2018-04-10 00:13:05 +00:00
Sunny Goyal b35f50cf55 Do not reset the previous state animation, if it is a part of the new state animaiton
Change-Id: Ic433db8cd2b0701923185d0a2db2a4361567437f
2018-04-09 16:31:12 -07:00