Commit Graph

2697 Commits

Author SHA1 Message Date
Pinyao Ting 1397a42fc2 include predicted_rank in app launch logging
Test:
1. . build/envsetup.sh && tapas NexusLauncher
2. ccdebug && cclogcat
3. launch from workspace any app that is also in predicted apps
4. verify in terminal it has correct predicted_rank

Bug: 143855018
Change-Id: I07a62f07057537a6c09384cf944bbc5aa5888d22
Merged-In: I07a62f07057537a6c09384cf944bbc5aa5888d22
2019-11-13 01:15:37 +00:00
Sunny Goyal a5020007e3 Scaling down hotseat to match prediction row size when going to overview
Bug: 141265005
Change-Id: I3b11146881af334508f553e4ca3a36b9291511d9
2019-11-06 22:36:34 +00:00
Andy Wickham 6547f1a937 Forces OveriewInputConsumer to be used when Assistant is running on top of Launcher.
Previously it was using OtherActivityInputConsumer, which got things in a
pretty weird state (e.g. most recent app would appear in the center as if
it was the active app when you started Quick Switching, etc.).

By default (toggleable by a feature flag), OverviewWithoutFocusInputConsumer
is used because Assistant doesn't seem to respect the CLOSE_SYSTEM_DIALOGS
broadcast, at least in half-shelf mode. In this case, the Home intent is
sent on swipe up, or you can dismiss it with the back gesture or by tapping
above the half shelf.

The new feature flag ASSISTANT_GIVES_LAUNCHER_FOCUS routes touches through
OverviewInputConsumer. As opposed to OverviewWithoutFocusInputConsumer,
this allows Quick Step to work while Assistant is running. Additional logic
is added to dismiss the Assistant when appropriate. Note that the dismissal
happens atomically, so it's not completely fluid with the other animations.
As mentioned above, this is disabled by default because Assistant doesn't
currently respect CLOSE_SYSTEM_DIALOGS.

Demo with the flag enabled (and Assistant respecting CLOSE_SYSTEM_DIALOGS):
https://drive.google.com/open?id=1W5jGpn_TEC-KjrYwQtaBT3pzxG_5tC4W

Bug: 139661510
Change-Id: I261653118aff289b329ec2a7ca6e52f100f7835a
Merged-In: I261653118aff289b329ec2a7ca6e52f100f7835a
2019-10-29 14:39:35 -07:00
Tony Wickham 329fca4550 Move overview haptic feedback to VibratorWrapper singleton
Bug: 141886704
Change-Id: I0178a52088dd4150d7ba054983697ea63a00d9a8
Merged-In: I0178a52088dd4150d7ba054983697ea63a00d9a8
2019-10-25 22:53:21 +00: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
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
Tony Wickham a0f77c4449 Fix quick switch test gesture in landscape 2-button mode
It should swipe from the bottom right to top right when the nav bar is
on the right, rather than from the bottom left to bottom right.

For now, disable testQuickSwitchFromApp() because it seems to have
other failures as well.

Bug: 140252765
Change-Id: I1f4989f3ea5456c18bb9cbf42ea4b157cee500d7
2019-10-15 17:30:47 -07:00
Sunny Goyal 91ac68284e Changing the taskAffinity for LockScreenRecentsActivity so that other activities do
not get started in this task

Bug: 138473688
Change-Id: I63b72236496a818d08ccb14e02e4fbf698a0cc49
(cherry picked from commit 657d3f8ca7)
2019-10-15 20:45:02 +00:00
Andy Wickham bdf1687f57 Merge "Fades out Assistant when entering Overview." into ub-launcher3-qt-future-dev 2019-10-14 23:46:32 +00:00
Andy Wickham fb578e4528 Fades out Assistant when entering Overview.
This makes the transition smoother, since
the Assistant goes away at the end of it.

Note this only applies to the transition
while an app other than Launcher is live.

Before: https://drive.google.com/open?id=18SOWTtTUzt19TReAYnofQLIShJ2I-odP
After: https://drive.google.com/open?id=1hqsikXSlCnSvNg0ZQYHxP-OIbS5yt9aW

Bug: 136282913
Change-Id: Ia53c2407c82725c776f27b0d6e80a34554b4a303
Merged-In: Ia53c2407c82725c776f27b0d6e80a34554b4a303
Tested: Manually
2019-10-14 16:04:33 -07:00
Tony Wickham 7a2076e3ab Merge "Add tests for quick switch from an app and home" into ub-launcher3-qt-future-dev 2019-10-14 19:07:37 +00:00
Tony Wickham 1e73e320b7 Add tests for quick switch from an app and home
Bug: 140252765
Change-Id: I5621b614ae2d8cd3db03cae818cf8b8c1c6cb20f
2019-10-14 11:51:19 -07:00
Sreyas Rangaraju 65d208211d Merge "Create hooks for Recents Card plugin. This adds another card in the Recents Overview space which can show various items." into ub-launcher3-qt-future-dev 2019-10-14 18:41:19 +00:00
Sreyas 8e02d17fa2 Create hooks for Recents Card plugin.
This adds another card in the Recents Overview space which can show various items.

Change-Id: Ifc36639ece8aa6b554bdbd3256f4195b1b220d68
Merged-In: Ifc36639ece8aa6b554bdbd3256f4195b1b220d68
2019-10-11 21:05:08 +00:00
Bill Yi e2c21704eb Import translations. DO NOT MERGE
Change-Id: I2ce1448b6a7ee5cb455a2fc044336c37e03093aa
Auto-generated-cl: translation import
2019-10-11 08:19:31 -07:00
Tony Wickham 9788183962 Merge "Fix quickswitch flickers/ignored swipes" into ub-launcher3-qt-future-dev 2019-10-07 21:08:34 +00:00
Tony Wickham af33f2c9d4 Fix quickswitch flickers/ignored swipes
- Don't set current page to running task when applying load plan,
  if we are already settling on a new task to launch.
- When starting a new task, finish to the running app if that's
  the task being started (should not happen with above change)
- When disabling free scroll mode, don't snap to a page if we're
  already on it. This was setting mNextPage so the first check
  was falsing.

Bug: 142068081
Change-Id: I5b392d9726a81c51718d2f94eee6cd4f78b61f69
2019-10-07 21:08:04 +00:00
vadimt 4f56803bd0 Increasing wait time for navigation mode switch.
am: d230af4e09

Change-Id: Ia5150735244249dd76c1993ff588036e4f18402b
2019-10-04 18:03:17 -07:00
vadimt d230af4e09 Increasing wait time for navigation mode switch.
Sometimes this fails in Cuttlefish.

Change-Id: Ifa2ffed5165625d51441fc3b203185fc55f7d53f
2019-10-04 17:12:26 -07:00
vadimt 1ac98548a7 resolve merge conflicts of 08776ada1e to ub-launcher3-qt-future-dev
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I9a3b0f67ee874b5ec4ad67f41a46ec7876d19082
Merged-in: I9a3b0f67ee874b5ec4ad67f41a46ec7876d19082
2019-10-03 20:58:15 +00:00
TreeHugger Robot 4a4755fc70 Merge "Fill in LauncherTarget fields with values extracted from LauncherLogProto.Target." into ub-launcher3-qt-future-dev 2019-10-02 23:09:52 +00:00
Tony Wickham c449a6417d Update all apps fade interpolators for home <-> all app
Previously, predictions faded in quickly but then all apps faded in
linerally over entire rest of the transition. Now, all apps fades in
quickly after reaching the overview threshold where predictions are
opaque.

Also implemented the reverse, so that predictions/all apps content
remain opaque when returning home until reaching the overview threshold
near the bottom, where they fade out as quickly as they faded in.

We do this for 3-button mode as well.

Bug: 141986013
Change-Id: Ia35ab3ac9714e89f754293445a7839e15da5313d
2019-10-02 09:51:51 -07:00
vadimt 7371e4da68 Waiting for Launcher model load in out-of-proc tests.
Not doing this seems to have caused flakes.

Bug: 141770616
Change-Id: Ia9caf20e4a2d93298adf4249ca815ad79bced802
Merged-in: Ia9caf20e4a2d93298adf4249ca815ad79bced802
2019-10-01 19:18:14 +00:00
Tony Wickham c9654eb091 Don't allow scrolling RecentsView outside navbar during quickswitch
Once the inputProxy (OverviewInputConsumer) was enabled, it was never
disabled. And while it was enabled, touches above the nav bar would go
through to launcher, allowing you to scroll RecentsView (for example)
during quick switch transitions. This breaks some assumptions, since
it doesn't go through our normal shared swipe state logic that cancels
the animation, updates the new end target (e.g. NEW_TASK vs LAST_TASK),
etc. Thus, if you tried returning to LAST_TASK via this route, we would
end up starting it as a new activity instead of resuming the existing
one, causing a flicker (I guess because that TaskView is hidden).

Test:
- Swipe up from task A to home (to enable input proxy)
- Open A
- Swipe to B, and during transition scroll back to A from the center of
the screen

Before, this caused a flicker, now the last scroll is ignored.

TODO: we should increase the nav region during quick switch to make it
easier to continue scrolling

Bug: 136829198
Bug: 138620399
Change-Id: I5ffb53743b728e1909066c5dd18cc9308aff2c7e
2019-10-01 10:16:26 -07:00
Vadim Tryshev 1430f132f3 Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
am: dd079691c1

Change-Id: I7419be6416f26274bf03abfd84eedef20fd6f084
2019-09-27 13:21:46 -07:00
vadimt 2611d79f69 Deprecating LauncherInstrumentation constructor with parameter
Change-Id: I779b4a8fde2db73cced8133f12d1356ad0b8729e
2019-09-27 12:00:09 -07:00
TreeHugger Robot d69327e9c0 Merge "Fix ScrimView caret alignment and ignore touches" into ub-launcher3-qt-future-dev 2019-09-27 00:15:36 +00:00
Samuel Fufa 0316d6cd7a Fix ScrimView caret alignment and ignore touches
Test:Manual
Bug:79868152
Change-Id: Idd5a2b965173b8071697b50aac8760b0d84e469f
2019-09-26 16:30:46 -07:00
Becky Qiu 5ba1fc93c4 Merge "Add OverviewScreenshotActions plugin interface and use it in TaskView." into ub-launcher3-qt-future-dev 2019-09-26 18:17:30 +00:00
Becky Qiu d3f6d72ebf Add OverviewScreenshotActions plugin interface and use it in TaskView.
Bug: 139828243
Change-Id: Idbefc11ef32619dd5eaaa5552088859eb2304e1e
Merged-In: Idbefc11ef32619dd5eaaa5552088859eb2304e1e
2019-09-26 18:05:47 +00:00
vadimt eda5c215b7 Merge "Removing debug tracing for a fixed bug" into ub-launcher3-qt-qpr1-dev
am: b72cd2629c

Change-Id: Id28e20b5fe23c6f6501f3c7a38305f0a306b287a
2019-09-25 12:21:06 -07:00
vadimt 49b64a98ca Removing debug tracing for a fixed bug
Bug: 141275518
Change-Id: I171361d4f797f587b404eed07108224d8ab844f8
2019-09-25 11:26:56 -07:00
Vadim Tryshev ec1ae481d4 Merge "Removing temporary checks that tests are running on AVD" into ub-launcher3-qt-qpr1-dev
am: 6929199c8a

Change-Id: Iaa6200f0371a4deca630194ac8ecfcfc04313750
2019-09-24 18:18:19 -07:00
Vadim Tryshev 6929199c8a Merge "Removing temporary checks that tests are running on AVD" into ub-launcher3-qt-qpr1-dev 2019-09-25 00:56:05 +00:00
vadimt 926e29f8b6 Removing temporary checks that tests are running on AVD
Bug: 136278866
Change-Id: I2b7b63b7745936ea84b7cba599e21d954b682ba5
2019-09-24 17:19:51 -07:00
TreeHugger Robot ffa00614b4 Merge "Move offscreenTranslation calculation to LauncherRecentsView" into ub-launcher3-qt-future-dev 2019-09-24 23:25:46 +00:00
Tony Wickham 8a1ba838f4 Move offscreenTranslation calculation to LauncherRecentsView
Couple of benefits here:
- Doesn't rely on having a measured TaskView, since it already knows how
  to calculate the task size
- Code can be shared (planning to use this for quick switch from home)

Bug:
Change-Id: I517a78506ac95fcc37d9225a074427941d691903
2019-09-24 14:23:26 -07:00
vadimt bba8c98de3 Removing "Failed to get system health diags" message from fallback tests
am: 9b1c168273

Change-Id: I4528370073f0258e5f0276dfb1d71dae9816ddea
2019-09-24 13:13:12 -07:00
vadimt 9b1c168273 Removing "Failed to get system health diags" message from fallback tests
Now getting diags though the test process that has right permissions.

This doesn't fix other failures in fallback tests.

Bug: 141517004
Change-Id: Ibba5f0471a83525a64544c62dbe82ab3e11712cd
Merged-in: Ibba5f0471a83525a64544c62dbe82ab3e11712cd
2019-09-24 19:31:35 +00:00
vadimt 6d5511a42f Merge "Removing debug tracing for flakes that stopped reproing" into ub-launcher3-qt-qpr1-dev
am: 76aadac4e4

Change-Id: I5099741d3502584f7d501d74897944edc3339977
2019-09-23 14:56:04 -07:00
vadimt 5466699f0b Removing debug tracing for flakes that stopped reproing
Bug: 139941530
Bug: 140311911
Change-Id: Idf4c013373e627db92aa96f9207e25336ee039f8
2019-09-23 13:57:32 -07:00
Tony Wickham 521224131e resolve merge conflicts of 5c229885fc to ub-launcher3-qt-future-dev
Bug: None
Test: I solemnly swear I tested this conflict resolution.

Change-Id: I41247ff46308b72158731e4a47466533d42e67c6
2019-09-20 16:22:59 -07:00
Tony Wickham 5c229885fc Merge "Don't crash when swiping up if there are no TaskViews" into ub-launcher3-qt-qpr1-dev 2019-09-20 22:44:28 +00:00
Tony Wickham 60bf8c117b Don't crash when swiping up if there are no TaskViews
This can happen in LockTask mode, after enabling Overview. In that case,
you are locked to the current task, but are allowed to go to overview
but no tasks are shown there.

Bug: 139917483
Change-Id: I2180cc5e72c343977ea53cc02907ed8dac0f8bc6
Merged-In: I2180cc5e72c343977ea53cc02907ed8dac0f8bc6
2019-09-20 22:01:18 +00:00
Becky Qiu 4df06903bc Fill in LauncherTarget fields with values extracted from LauncherLogProto.Target.
Test: manual
Bug: 137777105

Log result:
1. Swipe to -1:
  data {
    elapsed_timestamp_nanos: 1372265229686264
    atom {
      launcher_event {
        action: SWIPE_LEFT
        src_state: HOME
        dst_state: HOME
        extension {
          src_target {
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
2. Swipe out of -1:
  data {
    elapsed_timestamp_nanos: 1372368006970305
    atom {
      launcher_event {
        action: SWIPE_RIGHT
        src_state: HOME
        dst_state: HOME
        extension {
          src_target {
            page_id: -1
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
3. Launch app from homescreen:
  data {
    elapsed_timestamp_nanos: 1372397640628726
    atom {
      launcher_event {
        action: LAUNCH_APP
        src_state: HOME
        dst_state: BACKGROUND
        extension {
          src_target {
            item: APP_ICON
            grid_x: 2
            grid_y: 1
          }
          src_target {
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
4. Launch app from hotseat:
  data {
    elapsed_timestamp_nanos: 1372399813031963
    atom {
      launcher_event {
        action: LAUNCH_APP
        src_state: HOME
        dst_state: BACKGROUND
        extension {
          src_target {
            item: APP_ICON
            grid_x: 2
          }
          src_target {
            container: HOTSEAT
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
5. Launch app from allapps prediction:
  data {
    elapsed_timestamp_nanos: 1372403080724736
    atom {
      launcher_event {
        action: LAUNCH_APP
        src_state: ALLAPPS
        dst_state: BACKGROUND
        extension {
          src_target {
            item: APP_ICON
          }
          src_target {
            container: PREDICTION
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }

Change-Id: I981401d06577c15948cfee0062b8a6f8a5594345
2019-09-20 21:26:59 +00:00
vadimt ca939f073c Adding tracing for a lab-only flake.
am: 9f6cde1443

Change-Id: I31ce596847aa1506cefbde711ae6ad6f3e3b777e
2019-09-19 17:25:43 -07:00
vadimt 9f6cde1443 Adding tracing for a lab-only flake.
Bug: 141275518
Change-Id: I95544a55ef13002f696a82e52d54ffb6251d0e39
2019-09-19 16:07:05 -07:00
Shashwat Razdan 0c2a248109 Added AppLaunchEventsPlugin which relays app launch/dismiss events to
all connected plugins.
Listener for this plugin is added in PredictionAppTracker which receives
all app events.

Change-Id: Iec53d20272f6a587f78e3d84666efa4f02cf6962
(cherry picked from commit ae084dafd9)
2019-09-19 05:08:54 +00:00
Tony Wickham cdcfd98c05 Merge "Allow scroll to clear all in 3 button+fallback mode" into ub-launcher3-qt-qpr1-dev
am: 24fb1526e2

Change-Id: I59bf92b05d45c31705166e1211cf02ccbc348383
2019-09-18 08:12:41 -07:00