Commit Graph

1440 Commits

Author SHA1 Message Date
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 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 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
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 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
Hyunyoung Song 057059665e When DeviceConfig/FeatureFlag value is different than the previous value, refresh icon cache
am: e17a699618

Change-Id: I5c2e54c069fc03172f471f9655cd8b09b5ac6dce
2019-09-12 15:05:19 -07:00
Hyunyoung Song e17a699618 When DeviceConfig/FeatureFlag value is different than the previous
value, refresh icon cache

Bug: 135638690
Bug: 138964490

Test: manually toggled feature flag UI on/off
$ adb shell device_config put launcher APP_SEARCH_IMPROVEMENTS [true|false]
when launcher is in foreground and also when it is in the background

Afterwards, saw if "bank" would show BofA app or not

Change-Id: I98b62bd07b14a225168217d7eb9bfdfc7f74435d
2019-09-11 10:38:14 -07:00
Winson Chung ef52876739 Defer listening on widget host until after the state transition ends
Bug: 140246642
Change-Id: I4532e4298f04ff5c6dea04ccda89320995cadb80
2019-09-09 10:24:53 -07:00
Andy Wickham 90c16ace8a Reduces padding of the Overview shelf in no button mode.
Before: https://screenshot.googleplex.com/iw6baTCfoy2.png
After: https://screenshot.googleplex.com/8CcsQvLhYDo.png
Desired: https://b.corp.google.com/action/issues/139551306/attachments/26925873?download=false

Test: Examined before and after padding and verified 3-button is unaffected.
Fixes: 139551306

Change-Id: Ia416399cf25e7c6c2fb8aa84ad20e7ad74dcd31b
(cherry picked from commit ddc9622e92)
2019-09-03 22:05:20 +00:00
Andy Wickham ddc9622e92 Reduces padding of the Overview shelf in no button mode.
Before: https://screenshot.googleplex.com/iw6baTCfoy2.png
After: https://screenshot.googleplex.com/8CcsQvLhYDo.png
Desired: https://b.corp.google.com/action/issues/139551306/attachments/26925873?download=false

Test: Examined before and after padding and verified 3-button is unaffected.
Fixes: 139551306

Change-Id: Ia416399cf25e7c6c2fb8aa84ad20e7ad74dcd31b
2019-08-29 11:11:12 -07:00
Becky Qiu 71959e59d2 Merge "Move swipe actions on container logging to west world." into ub-launcher3-qt-qpr1-dev
am: 6d0d8969f6

Change-Id: I2229ea7c878ac84b00110235df65ced2f9baf171
2019-08-23 20:01:05 -07:00
Becky Qiu f0a014d7ff Move swipe actions on container logging to west world.
Test: manual
Bug: 137777105

Log result for swiping in and out of -1 screen.
  data {
    elapsed_timestamp_nanos: 597609736235111
    atom {
      launcher_event {
        action: SWIPE_LEFT
        src_state: HOME
        dst_state: HOME
        is_swipe_up_enabled: true
      }
    }
  }

  data {
    elapsed_timestamp_nanos: 597610569783111
    atom {
      launcher_event {
        action: SWIPE_RIGHT
        src_state: HOME
        dst_state: HOME
        is_swipe_up_enabled: true
      }
    }
  }


Change-Id: Ic84d3c32d1c9f780f13ec5cd6320e9f1d610f018
2019-08-22 16:27:49 -07:00
Sunny Goyal 6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
Hyunyoung Song 27df700f05 Merge "Make TogglableFlag backed by DeviceConfig for e2e testing" into ub-launcher3-qt-qpr1-dev
am: 96eba3aea6

Change-Id: I738256f1623119a61197c03008e098b066161542
2019-08-15 16:03:32 -07:00
Hyunyoung Song 96eba3aea6 Merge "Make TogglableFlag backed by DeviceConfig for e2e testing" into ub-launcher3-qt-qpr1-dev 2019-08-15 22:25:33 +00:00
Hyunyoung Song d4204437de Make TogglableFlag backed by DeviceConfig for e2e testing
Bug: 138964490

TL;DR;; need this to be part of QQ1 or QD1 to verify if DeviceConfig
can be supported for launcher toggleableFlags.

Not handled in this CL:
- When flag is locally modified, that will override the flag value
How that scenario is handled should be discussed separately and is not
within scope of this CL.

Change-Id: I2e6694a40bee9202ed0b0d559e3b5607634071bf
2019-08-15 14:02:28 -07:00
Sunny Goyal 934ebd087b Adding support for storing keywords in iconCache
Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9
Merged-In: I1183e63a6556ebfb3eee5df23d149e09728193a9
(cherry picked from commit e529a86fbd)
2019-08-14 22:12:49 +00:00
Becky Qiu 1289197487 Merge "Log the event for swiping up to dismiss a task in Overview." into ub-launcher3-qt-qpr1-dev
am: 22edac9bf5

Change-Id: Iae05c668fecf84c79086cfb6821e9644ac08bb71
2019-08-14 13:09:14 -07:00
Becky Qiu 90ea00b399 Log the event for swiping up to dismiss a task in Overview.
Test: manual
Bug: 137777105

Demo logging for dismissing a task:
  data {
    elapsed_timestamp_nanos: 70772067228810
    atom {
      launcher_event {
        action: DISMISS_TASK
        src_state: OVERVIEW
        dst_state: BACKGROUND
        is_swipe_up_enabled: true
      }
    }
  }

Change-Id: I5569b80e2e1f35661bc5e9e343c6c298791a1ec1
2019-08-09 10:57:05 -07:00
Vinit Nayak 268e4ff95c Remove activityInfo from cache on package uninstall
We were keeping stale activityInfo objects from
package manager after an application got uninstalled.
We also were not removing task icons from the
cache after they were removed, which meant killing an
app and then re-opening would put 2 entries in the cache
since the two had unique process IDs.

fixes: 137731960
Test: Download app from play store, open it,
go to overview and observe that correct icon showing.
Uninstall it, download same app again, open it, and
in overview confirm that correct app icon is still showing

Change-Id: Icf482b0ad0ae66c10d52547582d8eeb2a544fb88
2019-08-08 11:11:03 -07:00
Sunny Goyal e529a86fbd Adding support for storing keywords in iconCache
Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9
2019-08-07 15:51:25 -07:00
Sunny Goyal 64a6fb063e Merge "Revert "Use new onTaskListUpdated() callback"" into ub-launcher3-master 2019-08-07 14:49:52 +00:00
Sunny Goyal 54bbbdfa61 Revert "Use new onTaskListUpdated() callback"
This reverts commit a04997b081.

Reason for revert: Platform master has API changes, and launcher-master should still map to qpr branch

Change-Id: Ib201c71b5557715d585d322ec2a1a528e352e61c
2019-08-07 13:49:41 +00:00
Vinit Nayak 0664d9ad09 Merge "Use new onTaskListUpdated() callback" into ub-launcher3-master 2019-08-06 22:40:23 +00:00
Pinyao Ting e4061fc931 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
Merged-In: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 23:31:35 -07:00
Pinyao Ting 49a3e699f9 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 20:41:58 -07:00
Becky Qiu 9c6cfb4e04 Fill the log container as hotseat or workspace based on position.
am: 84fa94e2fc

Change-Id: If9a5d88062addbd09909e04ef5c2c59e7e5488a7
2019-08-01 16:00:47 -07:00
Jon Miranda 3ff3991f48 Merge "Fix bug where rounded corners were being set despite being disabled." into ub-launcher3-qt-dev am: 9da9a2bd21 am: f20a7d252c
am: 783717c0c6

Change-Id: I2c9738fa84d781cbfa9a6fbc071468a5247190ef
2019-08-01 15:31:05 -07:00
Becky Qiu 84fa94e2fc Fill the log container as hotseat or workspace based on position.
Test: manual
Bug: 137953006

Swipe from workspace:
07-30 15:15:44.031  9779  9779 D UserEvent: action:FLING direction=UP direction=UP
07-30 15:15:44.031  9779  9779 D UserEvent:  Source child:WORKSPACE id=0 span(951,1313)	parent:WORKSPACE id=0
07-30 15:15:44.031  9779  9779 D UserEvent:  Destination child:ALLAPPS
07-30 15:15:44.031  9779  9779 D UserEvent:  Elapsed container 826 ms, session 9361 ms, action 0 ms

Swipe from hotseat:
07-30 15:15:46.010  9779  9779 D UserEvent: action:FLING direction=UP direction=UP
07-30 15:15:46.010  9779  9779 D UserEvent:  Source child:HOTSEAT id=0 span(786,1908)	parent:WORKSPACE id=0
07-30 15:15:46.010  9779  9779 D UserEvent:  Destination child:ALLAPPS
07-30 15:15:46.010  9779  9779 D UserEvent:  Elapsed container 1139 ms, session 11339 ms, action 0 ms

Change-Id: I959528889fda778efc569bb59e7f44d3bd5b81bc
2019-08-01 22:24:44 +00:00
Jon Miranda f20a7d252c Merge "Fix bug where rounded corners were being set despite being disabled." into ub-launcher3-qt-dev
am: 9da9a2bd21

Change-Id: Icae4fd3fef3ad221d45e8d9ecdcc018813d560f3
2019-08-01 15:05:00 -07:00
Tony Wickham dd53ba5065 Merge changes Ib3e373c2,Ia5d6f545 into ub-launcher3-qt-r1-dev am: 1343f03e2e
am: 70f539cd45

Change-Id: Ifddcba1cd63950424f88ad1d8e01fa9a11f73a2e
2019-07-31 15:50:44 -07:00
Tony Wickham 35a4e0eec9 Tie prediction text to all apps interpolator
Now floating headers get 2 interpolators: one for the header content
itselt, and one for the all apps content that follows. That way, they
can choose to intperolate part of their content as if it were part of
all apps instead of the header. Currently, we do this to animate
predicted icons quickly, followed by the all apps icons, predictions
text, all apps scrollbar, and all apps divider as you continue swiping.

Bug: 132455160
Change-Id: Ib3e373c291e174e1306a53854d0ad4dc29eb4b76
2019-07-31 14:45:18 -07:00
Tony Wickham c088051c29 Add OverviewScrim to show below overview but above workspace
- Refactor some basic scrim logic to Scrim class and have
  WorkspaceAndHotseatScrim and OverviewScrim extend it
- Draw OverviewScrim under recents unless predictions are disabled, in
  which case draw it under hotseat (since that is in recents)
- Remove sysui scrim (behind status bar and nav bar) when overview is
  peeking

Bug: 132455160
Change-Id: Ia5d6f54582a4c5a70e3b2d4a98281567edd68519
2019-07-31 14:44:28 -07:00
Vinit Nayak a04997b081 Use new onTaskListUpdated() callback
Migrated to general method for receiving updates
whenever the recents list undergoes any additions or
removals.

Test: Opened apps, and as I closed them I ensured
via debugger and log statements that the callback was
being triggered from the framework module. See
tests in RecentTasksTest

fixes: 111077107
Change-Id: Ia9bddb50861a1b107e6a88c9f9bb89944800d5d8
2019-07-26 12:19:57 -07:00
Hyunyoung Song c37af4325f Merge "Add several missing swipe logging Enable swipe down to open noti shade from landscape" into ub-launcher3-qt-r1-dev
am: 2cccb134a4

Change-Id: I6fd477dc398e55358a5110a552430eb61c29373d
2019-07-25 15:14:33 -07:00
TreeHugger Robot 2cccb134a4 Merge "Add several missing swipe logging Enable swipe down to open noti shade from landscape" into ub-launcher3-qt-r1-dev 2019-07-25 21:55:16 +00:00
James O'Leary b1d239405f Merge "Fix QSB becoming invisible" into ub-launcher3-qt-r1-dev
am: 93dceb8a48

Change-Id: Id0a72f39d828535f177992fdf2c674cc84c5a629
2019-07-25 13:57:54 -07:00
James O'Leary 93dceb8a48 Merge "Fix QSB becoming invisible" into ub-launcher3-qt-r1-dev 2019-07-25 20:41:34 +00:00
Hyunyoung Song e299a45944 Add several missing swipe logging
Enable swipe down to open noti shade from landscape

Bug: 137137090
Bug: 137954767
Bug: 134181439

Change-Id: I47b4d17c9ae0586565fce101eb478e33ed8f7e3d
2019-07-25 13:18:48 -07:00
James O'Leary 74ece6b021 Fix QSB becoming invisible
This could not be reproduced until I removed a line that wouldn't call
onAssistantVisiblityChanged if the argument was the same value as the
argument as the previous call.

After that, the bug became readily reproducible. I traced through
Launcher till I found that FallbackActivityControllerHelper
.onAssistantVisibilityChanged was being called while the screen was
locked, proving that onAssistantVisiblityChanged was _not_ reaching
launcher.

Test: Verify bug no longer reproduces.
Bug: 134981174
Bug: 135247753
Bug: 135572849
Bug: 135733393
Bug: 136386749
Bug: 136776987
Bug: 137534772
Bug: 137764419

Change-Id: Ib5e8df3b5030a77c5df351a1fcd993db6bd602fc
2019-07-25 10:22:02 -04:00
Tony Wickham 503575a9e4 Merge "Distinguish mDragHandleProgress from mMidProgress" into ub-launcher3-qt-r1-dev
am: cfbdb91a7f

Change-Id: Id41c02c6543a4b0a12fc364e5c8e41dd6ccf9fc1
2019-07-24 12:57:34 -07:00
Sunny Goyal 6d9eed757f Merge "Using the first frame delay based on the display refresh rate instead of hardcoding it to 16ms" into ub-launcher3-qt-r1-dev
am: b7094fcf36

Change-Id: Icd4e52b33b33718cb91b2fd082d85637e820390f
2019-07-24 12:57:15 -07:00
Tony Wickham cfbdb91a7f Merge "Distinguish mDragHandleProgress from mMidProgress" into ub-launcher3-qt-r1-dev 2019-07-24 19:39:48 +00:00
Sunny Goyal 4e6c45bcd3 Using the first frame delay based on the display refresh rate instead of
hardcoding it to 16ms

> Creating a utility class for caching display property changes

Bug: 128940249
Change-Id: I6f9a214548de65bd1c8530508d665ee88312da4a
2019-07-24 10:12:37 -07:00
Tony Wickham fbd77c48cc Distinguish mDragHandleProgress from mMidProgress
mMidProgress is intended to be the point at which we reach Overview when
swiping up and thus start scrimming it as All Apps shows above it. For
that reason, mMidProgress needs to match OverviewState's progress. In
contrast, the drag handle (accessibility arrow) can move up sooner to
avoid overlapping with the QSB; for this, we added mDragHandleProgress.

Bug: 136800511
Change-Id: I2825ff798707530420855257350e492b4b9b77dc
2019-07-23 16:58:45 -07:00
Jon Miranda 9566a04400 Fix bug where rounded corners were being set despite being disabled.
Bug: 138117089
Change-Id: Icb852e2e07d80c45ad3406ef432b89720887fccf
2019-07-23 22:24:35 +00:00
Vinit Nayak 15abc500ea Refactor RecentTasksList ctor to be testable
Made ctor accept more arguments so we can
pass in mock objects for unit testing.

Test: Created RecentsTasksListTest.java, passes
adb shell am instrument -w -r -e debug false -e \
class 'com.android.quickstep.RecentTasksListTest' \
com.google.android.apps.nexuslauncher.tests/androidx.test.runner.AndroidJUnitRunner

Fixes: 135687618
Change-Id: Iffda661e9d5329a2a403060bde674ab81e4e720e
2019-07-23 11:49:19 -07:00
Tony Wickham b6841ac630 Revert the changes that prevented touch on RecentsView during animation
The original bug that was solving seems to be fixed by other changes,
and this allows users to scroll, dismiss, etc on recent tasks before
fully reaching overview from an app.

Bug: 137487381
Change-Id: I28a708811bba3ce739ce261f19eb29558d8f0e7d
2019-07-22 12:39:59 -07:00