Commit Graph

34630 Commits

Author SHA1 Message Date
Tracy Zhou 734f2d9f15 Fix screenshot not getting cleaned up after recents animation cancelation
Before this change, mCanceledThumbnail is used but never assigned.

Test: Turn on live tile, swipe up to overview from app and observe that the screenshot from recents animation gets properly cleaned up.
Fixes: 143307786
Change-Id: I8fba46324c43df661adf12cd1e5d9e06a0a3ee6f
2019-10-24 14:51:23 -07:00
TreeHugger Robot 037b1dcf6e Merge "Fix work profile promise icon bugs." into ub-launcher3-master 2019-10-24 21:40:40 +00:00
TreeHugger Robot 949b96a82d Merge "Move addPluginListener to onUserUnlocked" into ub-launcher3-master 2019-10-24 21:26:34 +00:00
Winson Chung eed626a63c Move addPluginListener to onUserUnlocked
addPluginListener() needs to be moved into onUserUnlocked() since it
reads from the shared preferences. This fixes a crash in
Launcher3QuickStepGo on wembley.

Bug: 143249037
Change-Id: Ib60f688cb3f91e377141fab1ad9f2a0071c96694
2019-10-24 13:44:43 -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
Tony Wickham 892cf58a6a [automerger skipped] Merge "Refactor SwipeDetector to track both axes" into ub-launcher3-qt-future-dev
am: f13109df05 -s ours
am skip reason: change_id I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d with SHA1 5aeb3b84b8 is in history

Change-Id: I890cdcb712333c1519b411be1220e2710e290f8d
2019-10-24 12:42:53 -07:00
TreeHugger Robot f13109df05 Merge "Refactor SwipeDetector to track both axes" into ub-launcher3-qt-future-dev 2019-10-24 19:24:12 +00:00
Tony Wickham eed585b0c3 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
Merged-In: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
2019-10-24 18:56:44 +00: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
TreeHugger Robot 6735624704 Merge "Adding support for remote app action provider." into ub-launcher3-master 2019-10-24 17:33:42 +00:00
sallyyuen cd0a5c536a Fix TalkBack page announcments in RecentsView
Because a PagedView has page a11y actions (PAGE_LEFT/RIGHT),
a11y services now identify recents apps as a pager.
Tweak the a11y event info to accomodate this so the announcements
are correct.
Also fix the CollectionItemInfo to have the correct page index.

Bug: 141899192
Test: Tested with TalkBack on device
Change-Id: Ic578bee8de26a41f0ab0e5468f1fd060ed21a7e1
2019-10-24 16:53:50 +00:00
Tony Wickham f6d504d4cb [automerger skipped] Merge "Fix testQuickSwitchFromApp" into ub-launcher3-qt-future-dev
am: ec72bf63df -s ours
am skip reason: change_id Ie137261ce65bfd3dd39df78d57784854a026e967 with SHA1 bc42d64c85 is in history

Change-Id: I7e3f5f26ed22351f0b331edcc79a88190416d6b1
2019-10-23 18:09:49 -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
TreeHugger Robot ec72bf63df Merge "Fix testQuickSwitchFromApp" into ub-launcher3-qt-future-dev 2019-10-24 00:47:01 +00:00
TreeHugger Robot 85561d1e44 Merge "Fix testQuickSwitchFromApp" into ub-launcher3-master 2019-10-24 00:12:09 +00:00
TreeHugger Robot e60ae45b9e Merge "13/ Rely on the device state's navigation mode" into ub-launcher3-master 2019-10-23 23:45:52 +00:00
Tony Wickham bc42d64c85 Fix testQuickSwitchFromApp
Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.

Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp

Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
2019-10-23 23:42:19 +00:00
Tony Wickham 476b7d4378 Fix testQuickSwitchFromApp
Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.

Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp

Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
Merged-In: Ie137261ce65bfd3dd39df78d57784854a026e967
2019-10-23 23:40:57 +00:00
Winson Chung f6448e62e6 Merge "Reduce animation time for some common TAPL actions (affects jank/perf tests)" into ub-launcher3-master 2019-10-23 23:40:53 +00:00
Winson Chung 82b2ef27c8 Reduce animation time for some common TAPL actions (affects jank/perf tests)
- All apps swipe up 1s -> 200ms (doesn't matter if it's a fling)
- Scroll to last visible row 2.5s -> 1.25s (seems sufficient to not be a fling)
- Drag icon to workspace 2s -> 500ms (seems sufficient to not be a fling)
- This changes the total frames produced for the jank tests, but should not
  change the jank proportion or the individual frame drawing times

Bug: 141484300
Change-Id: I9f2e647ebc2c27c6269238daa4c3e6ad314c8161
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-23 23:31:20 +00:00
Xin Li 9431e79209 Skip QD1A.190821.011 in stage-aosp-master am: 6d14b39680 am: 3fdcb43a43
am: b482bb92e9

Change-Id: I1e0e2b2ef01652369e0c8a4962b25baa87ab7fc2
2019-10-23 16:15:56 -07:00
Xin Li b482bb92e9 Skip QD1A.190821.011 in stage-aosp-master am: 6d14b39680
am: 3fdcb43a43

Change-Id: I2b1d7d8c2f49f38f47ad85eeab233a2a5a517dfd
2019-10-23 15:51:29 -07:00
Xin Li 3fdcb43a43 Skip QD1A.190821.011 in stage-aosp-master
am: 6d14b39680

Change-Id: I467211012653848fd3c52a78533bbe78511634dc
2019-10-23 15:32:10 -07:00
TreeHugger Robot 91fbe43990 Merge "Separating SystemShortcut and Factory" into ub-launcher3-master 2019-10-23 22:30:08 +00:00
Winson Chung a85365c22b 13/ Rely on the device state's navigation mode
- Rely on the device state navigation mode instead of tracking it
  independently in various places

Bug: 141886704
Change-Id: I421c1fa11ca7362aff8e2388a2b5d427b39af3e9
2019-10-23 15:00:59 -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
TreeHugger Robot 7caa519140 Merge "Step 4 from the plan below:" into ub-launcher3-master 2019-10-23 17:54:19 +00:00
Sunny Goyal c78308a9a7 Merge "Subclassing Launcher instead of using UiFactory" into ub-launcher3-master 2019-10-22 19:21:11 +00:00
James O'Leary bd83aead35 Merge "QuickCaptureInputConsumer -> OverscrollInputConsumer + plugin" into ub-launcher3-master 2019-10-22 18:40:49 +00:00
James O'Leary 9e57e74005 QuickCaptureInputConsumer -> OverscrollInputConsumer + plugin
Test: Implemented plugin interface in Compose studiow build in
google_experimental, verified plugin shows up appropriately in
Launcher's home settings screen, verified gesture works if Compose
plugin enabled, and doesn't work if Compose plugin disabled.
Bug: n/a

Change-Id: Ica24ee8fe814ee02a1497a1bfbe7c7a24489b71e
2019-10-22 13:04:20 -04:00
TreeHugger Robot 3b78d08109 Merge "Restoring 10-sec wait for model initialization" into ub-launcher3-master 2019-10-22 15:59:46 +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
android-build-team Robot 16fdeda6a6 Snap for 5954522 from b6af1d0efc to rvc-release
Change-Id: If8ef83bc21c9e2df2f2e98b0e7fbde4af5135830
2019-10-21 06:21:27 +00:00
TreeHugger Robot d78d80beca Merge "Skip updating launcher state if it's already destroyed" into ub-launcher3-master 2019-10-19 00:26:52 +00:00
vadimt b648e02d06 Fixing activity leak on config change
am: 7fcbd2379b

Change-Id: I33a78825552b3a050ee95b42fa0699d9b063c281
2019-10-18 13:31:27 -07:00
vadimt 3a13366e00 Restoring 10-sec wait for model initialization
Will see if ag/9573576 fixed long model loading

Bug: 136278866
Bug: 142514365
Change-Id: If0dc61faff00683cf3248c127a64ff5b065f9ae4
2019-10-18 12:43:10 -07:00
vadimt 7fcbd2379b 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
(cherry picked from commit ebb5c75344)
2019-10-18 19:36:26 +00:00
Vadim Tryshev 47ed07d708 Merge "Fixing activity leak on config change" into ub-launcher3-master 2019-10-18 19:26:56 +00:00
Winson Chung 94302570e6 Skip updating launcher state if it's already destroyed
- Prior to ag/9526193, there were a mixture of getCreatedActivity() and
  passed in Activity calls. In the cases where we used the passed in
  activity, it would happily make the call even if the activity is already
  destroyed, but since we migrated to using the unified getCreatedActivity()
  call, it results in an NPE. Since it's unnecessary to update the destroyed
  activity, we can simply skip this work.

  Long term, we should consider baking the activity associated with the
  call into the activity interface, and ensure that the interface itself
  is updated whenever the activity is recreated.

Bug: 141886704

Change-Id: I4f043e455d8d0d1c1b86362cc72618018bfbd900
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-18 12:15:12 -07: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 bb39993b64 Merge "Skip waiting for idle if the message queue is already idle" into ub-launcher3-master 2019-10-18 17:16:11 +00: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
vadimt ad81b816f0 Step 4 from the plan below:
1. Skip all tests that fail in inproc mode on CF (this CL)
2. Observe postsubmit and make sure no inproc tests are failing or too
flaky on CF
3. Enable presubmit
4. Switch to skipping tests from step 1 only for inproc presubmit;
they'll start failing in postsubmit
5. Gradually make all tests pass and not flaky and enable them back on
presubmit

Bug: 142828227
Change-Id: I0092d6b92b0358866f8cbf9e00dbe3fabe23703d
2019-10-17 17:52:29 -07:00
TreeHugger Robot 8625d0d8e7 Merge "Fix regression from ag/9518396" into ub-launcher3-master 2019-10-17 23:51:11 +00:00
Sreyas Rangaraju 5a6eb2d5df Merge "Alpha correction. mContentAlpha sometimes equals 0, changing to 1 ensures recents card always shows when supposed to" into ub-launcher3-master 2019-10-17 23:25:00 +00:00
Winson Chung dfd8b5e07d Fix regression from ag/9518396
- Previously, we would only cancel the current animation if
  sharedState.canBeContinued which was only set when mGestureEndTarget
  was set, which is only calculated when the swipe gesture ends,
  and is only true if the end target is not Launcher.

  In ag//9518396 the check for the null end target was moved into
  isRunningAnimationToLauncher(), but that call actually bakes in two
  checks together, which means that even when tapping the home button
  (where there is no gesture and no end target), it would return false.
  Instead, we should ensure that the gesture target is set before trying
  to cancel the animation.
- Also fix an existing issue where if the consumer is cleaned up after
  the start callback is registered, but not before the callback has
  returned, that we may incorrectly set the wrong launcher state since
  the callback is made to the old gesture handler which tries to prepare
  the recents UI (this manifests as a blank launcher screen).

Bug: 141886704
Change-Id: I642f20d631924730e98d10bb2123bd9448793fc6
2019-10-17 16:20:15 -07:00
Sreyas 3f18cc444d Alpha correction.
mContentAlpha sometimes equals 0, changing to 1 ensures recents card always shows when supposed to

Change-Id: I27eda97b72b75263c0aac09e2355bca72daecc27
2019-10-17 14:35:04 -07:00
TreeHugger Robot 221823c337 Merge "Fixing nulpointer exception in AOSP quickstep builds" into ub-launcher3-master 2019-10-17 21:03:15 +00:00