Commit Graph

9415 Commits

Author SHA1 Message Date
TreeHugger Robot 7744b8251a Merge "Moving some notification binder calls to worker thread" into ub-launcher3-master 2019-10-25 22:56:44 +00:00
Tony Wickham 052c881415 Move overview haptic feedback to VibratorWrapper singleton
Bug: 141886704
Change-Id: I0178a52088dd4150d7ba054983697ea63a00d9a8
2019-10-25 21:48:22 +00:00
vadimt 23c8341096 Removing tracing and @Stability for a fixed bug
Bug: 142514365
Change-Id: I147850db274c465fb964eca30b97b3ebaaa2ccf6
2019-10-25 11:21:33 -07:00
Jon Miranda 26256f79c3 Fix work profile promise icon bugs.
- We did not pass in the user when creating the workspace item infos.
- Added check for if app is installed before adding item to workspace
  to prevent any stale promise icons. This seems to happen when uninstalling
  and then immediately reinstalling an application.

Bug: 141556707
Change-Id: I2db2d8da449c37eb248a59fbc9e7b517f50855c1
2019-10-24 13:27:41 -07:00
TreeHugger Robot b7d463e74c Merge "Refactor SwipeDetector to track both axes" into ub-launcher3-master 2019-10-24 18:36:51 +00:00
Tony Wickham 5aeb3b84b8 Refactor SwipeDetector to track both axes
Existing clients now use the SingleAxisSwipeDetector subclass. A
followup CL will add BothAxesSwipeDetector, whose first client will be
the quick switch from home controller.

Bug: 126596417
Change-Id: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
2019-10-24 10:38:17 -07:00
Sunny Goyal 3a1eadd37b Adding support for remote app action provider.
> Connect to a predefined content provider to get package specific action
> Add that action to shortcut menu and task menu

Change-Id: Ide5c09d04112e86c8e19c2f9e66c88c15b3fd04e
2019-10-23 17:51:13 -07:00
Sunny Goyal 7805d49764 Separating SystemShortcut and Factory
> This makes easier to extend the factory and callbacks separately
> Availability checks are only performed once when getting the shortcut

Change-Id: I413541eabfb2b9e987c852d5171c6696b1853958
2019-10-23 12:57:50 -07:00
Sunny Goyal c78308a9a7 Merge "Subclassing Launcher instead of using UiFactory" into ub-launcher3-master 2019-10-22 19:21:11 +00:00
Sunny Goyal 7c53d355bf Moving some notification binder calls to worker thread
Change-Id: I16c4aded7b709282a9b3d0df64111a9a40366b50
2019-10-21 15:01:10 -07:00
Sunny Goyal 210e174c9c Subclassing Launcher instead of using UiFactory
Allows us to override only the required methods, instead of providing
a proxy method for everything

Change-Id: I816dcdb2a8d5432496050118ded0f2bbe7122cf7
2019-10-21 11:10:21 -07:00
Vadim Tryshev 47ed07d708 Merge "Fixing activity leak on config change" into ub-launcher3-master 2019-10-18 19:26:56 +00:00
vadimt ebb5c75344 Fixing activity leak on config change
If attachTo happens before the view is attached to window,
ViewOnDrawExecutor hooks to the tree observer twice (second time from
onViewAttachedToWindow). It only unhooks once.

Since tree observer is global, this leads to leaking the activity, and
besides, all old activities getting the events from the tree observer.

Bug: 139137636
Change-Id: Ie2641b8f3614545052fe34ad6588b070c3b82a33
2019-10-18 11:34:21 -07:00
Winson Chung cebfec6245 Skip waiting for idle if the message queue is already idle
Bug: 142514365
Change-Id: I22eb94c234766a40eac4c8dcc33d204b2417c2d6
2019-10-17 22:51:40 -07:00
Winson Chung c9bf6d45ac 9/ Clean up swipe shared state
- Add TaskAnimationManager which keeps track of the animation state whose
  lifecycle can be longer than the gesture.  Move some of the logic related
  to cleaning up old animations into this class (called when the state is
  shared across gestures).
- Instead of calling into the shared state directly via UIFactory, add
  callback to cleanup the animation and shared state from Launcher

Bug: 141886704

Change-Id: Ib6140b37162f7460a20fa1046cfd4f4068e4a1c6
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-16 17:17:34 -07:00
Jonathan Miranda 643598987b Merge "Have consistent All Apps UI between grid size changes." into ub-launcher3-qt-future-dev
am: c3a688a973

Change-Id: I6c9d825e85f55bd3160ab5e2a37e707f3f525459
2019-10-16 15:51:36 -07:00
Jonathan Miranda c3a688a973 Merge "Have consistent All Apps UI between grid size changes." into ub-launcher3-qt-future-dev 2019-10-16 22:36:17 +00:00
Pinyao Ting 7242db1a7c Revert "Revert "Revert "Revert "Revert "cache shourtcut image"""""
This reverts commit 28dc8de660.

Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.

Change-Id: I5d67ac0c4c867a40e882b7a46be446f8f7f63ac7
2019-10-16 14:52:28 -07:00
TreeHugger Robot 55395ea8f6 Merge "Revert "fetch and update shortcut icons in background thread"" into ub-launcher3-master 2019-10-16 21:49:09 +00:00
Pinyao Ting 01c80d7a00 Revert "fetch and update shortcut icons in background thread"
This reverts commit 4ec390e490.

Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.

Bug: 142514365
Change-Id: If7a69844aba7f32690ff347f2db11f0a8041b9e4
2019-10-16 20:51:22 +00:00
Winson Chung 5cc62c7d0b Fix a couple trace issues
- Adding trace tokens since we can be starting/ending traces out of order
- Fixing issue with draw hitting twice causing the trace stack to be
  popped twice
- Fix issue with endFlagOverrides not removing from the stack

Bug: 142803200

Change-Id: I8649b94249910a352f00f2f2c2459c355d2bab00
2019-10-16 12:34:58 -07:00
Jon Miranda 64d7481597 Have consistent All Apps UI between grid size changes.
We build an IDP with no grid size override values. This
allows us to reference the profile measurements so that we can have a
consistent UI for areas that the grid size change should not affect.

Bug: 124967099
Change-Id: I6235862c95800d8f31dbf2de1d12b1fcf4dbd850
2019-10-16 11:21:36 -07:00
Tony Wickham 5347f0c5f6 Merge "Fix mSubtractDisplacement when recatching" into ub-launcher3-qt-future-dev
am: ab732f0baa

Change-Id: I26ab6eb11e0ef1c53c96585ad069e1a0da629bca
2019-10-15 12:19:12 -07:00
Tony Wickham 14b919e2fd Fix mSubtractDisplacement when recatching
Previously we correctly set mSubtractDisplacement when re-catching
during the SETTLING state, but then immediately overrode it to be
+/-mTouchSlop.

Test: Swipe up to all apps, catch it by touching down during the
transition, ensure there's no jump when starting to move again.

Change-Id: I5d543e8a8b027b68bafb26b752e70862f6ae0777
2019-10-15 11:35:15 -07:00
vadimt 6c484bc9bf More logging for a lab-only bug
Bug: 142514365
Change-Id: I9936415fc4f3bfd4676d607f2dfff44070409c0c
2019-10-15 10:55:58 -07:00
TreeHugger Robot 8099e194d7 Merge changes from topic "shortcut-worker-thread" into ub-launcher3-master
* changes:
  fetch and update shortcut icons in background thread
  Revert "Revert "Revert "Revert "cache shourtcut image""""
2019-10-15 17:42:40 +00:00
TreeHugger Robot d410c1b829 Merge "include error log to debug the issue custom shortcut not working" into ub-launcher3-master 2019-10-15 17:01:10 +00:00
Pinyao Ting 4ec390e490 fetch and update shortcut icons in background thread
Bug: 141568904
Test: Manually verified use cases from following call-site (with and
without delay)

LauncherAppsCompatVO
  1. (Custom Shortcut) Long click on google maps -> widgets ->
     drag driving mode to workspace.
  2. Open chrome -> add to home screen -> add -> add automatically.

InstallShortcutReceiver
  Removed the line that trigger above flow for android O and above,
  then open chrome -> add to home screen -> add -> add automatically.

ShortcutDragPreviewProvider
  qdb -> long press on suggested app that has deep shortcut -> drag
  to workspace.

Change-Id: I59a4d004913a8df697af1fcfe0a080b6da01eefd
2019-10-15 09:54:09 -07:00
Pinyao Ting 28dc8de660 Revert "Revert "Revert "Revert "cache shourtcut image""""
This reverts commit 52908c9adc.

Reason for revert: roll-forward and fixes the crash due to access icon cache on main thread

Bug: 141568904
Change-Id: I1274db349c4f508d9cf59735b5f15180bb0ec033
2019-10-15 09:54:09 -07:00
vadimt 54e0c9e49c Tracing to determine why the model doesn't load
Bug: 142514365
Change-Id: I30ecaec5a5d0868db10157c61a2a8d7dd12872ca
2019-10-14 18:39:10 -07:00
Pinyao Ting b9f25e631b include error log to debug the issue custom shortcut not working
Bug: 141568904
Change-Id: I7e6b9aa4c3e1314aee18cbea81efa881b574923c
2019-10-14 15:55:21 -07:00
TreeHugger Robot 6c12641bee Merge "Unifying various tracing calls" into ub-launcher3-master 2019-10-14 22:29:59 +00:00
Sunny Goyal 17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -07:00
vadimt ce25a2bf68 Adding tracing for a lab-only flake
Bug: 142514365
Change-Id: I9c93ecabbcbad6d4683d595587831d8465e62ee8
2019-10-14 11:34:38 -07:00
TreeHugger Robot 4009493f3c Merge "Wait for the task to be in recents before validation" into ub-launcher3-master 2019-10-12 00:20:10 +00:00
Winson Chung c062580b5a Wait for the task to be in recents before validation
- There are two issues:
  1) Currently the system does not add the task to the task list until
     the activity starting the task has been resumed (to be fixed in a
     follow up platform CL). When the three activities are started in
     sequence, it's possible for one of the activities to not reach the
     resumed state leading to an unexpected number of recent tasks the
     next time it's fetched.
  2) When swiping up, it may take time for getTasks to return and call
     applyLoadPlan, so try and wait until the task views have had a
     chance to be applied before continuing.
  3) Use the launcher activity tracker instead of activity rule since it
     will return the same activity even after the activity is destroyed
- Move the margin handling to the caller instead of the scroll method

Bug: 141580748
Change-Id: I2b7634f5ac6869ba4b369b3bd60e0f63747c0f0b
2019-10-11 17:10:38 -07:00
Jon Miranda 4d6038e63a Merge "Wait until listeners/end runnable is created before checking icon result." into ub-launcher3-qt-future-dev
am: 3d97fdcfdf

Change-Id: I22b11d50b86da3e50726dada351797a5774f3b3f
2019-10-11 11:53:30 -07:00
Jon Miranda 1dd2e48190 Wait until listeners/end runnable is created before checking icon result.
This prevents the case where original icon is in hidden state, then the
view gets recycled and since there is no listener/end runnable the original
icon is left in the hidden state.

Bug: 142120338
Change-Id: I5f5bfa2a7c70d10869f51edf5c40bbaab1ef93bc
2019-10-11 11:03:26 -07:00
Winson Chung bfcee430fe 5/ Remove OverviewInteractionState
- We can move the background call to UiThreadHelper, the last sysui flags
  and back button alpha to SystemUiProxy (and dedupe values there as well)

Bug: 141886704

Change-Id: I22183608700c6d71355597c7a08eefa19f4381fd
2019-10-08 13:15:15 -07:00
Winson Chung 8ff53f7e65 4/ Move SystemUiProxy to its own singleton instead of routing through the model
Bug: 141886704
Change-Id: I415b9ef7b57b525407e3a341b946e3ca66125102
2019-10-08 13:15:13 -07:00
James O'Leary 8d46a3dc00 Merge "Add feature flag + leftward swipe for Compose access." into ub-launcher3-master 2019-10-08 19:03:04 +00:00
TreeHugger Robot f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
Jeff Pierce e4607587ed Add feature flag + leftward swipe for Compose access.
Stole ag/9453040 from jspierce@ and added a feature flag.

ag/9453040: Exploratory prototype to test leftward swipe access to
Compose across home screen, launcher, and lock screen. Requires Compose
APK (installed separately).

Change-Id: I15a045976b1eb41392795d3a4f0743f365dec1d2
2019-10-08 14:00:53 -04:00
vadimt 4b5c1ef71b Adding support for intentionally leaking views.
Bug: 139137636
Change-Id: I923d1781daee9ae47eb306ee8fa3c44790c6993f
2019-10-08 17:04:26 +00:00
TreeHugger Robot 86017c9611 Merge "Removing access to LauncherModel.getCallbacks" into ub-launcher3-master 2019-10-08 16:26:12 +00:00
TreeHugger Robot 8ae1151387 Merge "Reduce risk of flakes in memory leak detection tests." into ub-launcher3-master 2019-10-08 16:24:34 +00:00
Samuel Fufa 023188e424 Merge "Scale Icon badges for shortcut and widgets" into ub-launcher3-qt-future-dev
am: f2d486e5b0

Change-Id: I5c2c115b1ee42489d969ff30c48abf00d4a5a3f7
2019-10-07 18:56:02 -07:00
Samuel Fufa f2d486e5b0 Merge "Scale Icon badges for shortcut and widgets" into ub-launcher3-qt-future-dev 2019-10-08 01:41:53 +00:00
vadimt 1b92f6d964 Reduce risk of flakes in memory leak detection tests.
Now performing jreck@-style garbage collection prior to getting Launcher
PSS. The reduces PSS noise from ~700KB to ~250KB (std dev).

The tests (MemoryTests) run outside of Launcher process and
communicate with Launcher via RPC.

The change is in the RPC handler that lives in Launcher and returns
Launcher PSS to the test.

Bug: 139137636
Change-Id: I457e590b005dac53345f4223d972c7961754938c
2019-10-08 01:05:41 +00:00
Tony Wickham 1ab5de3fc8 Merge "Fix quickswitch flickers/ignored swipes" into ub-launcher3-qt-future-dev
am: 9788183962

Change-Id: I153fe569fd3f2c8ad065282eed56f9f13c5ab0d4
2019-10-07 14:27:22 -07:00