Commit Graph

1470 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 221823c337 Merge "Fixing nulpointer exception in AOSP quickstep builds" into ub-launcher3-master 2019-10-17 21:03:15 +00:00
Sunny Goyal be336e0195 Fixing nulpointer exception in AOSP quickstep builds
Change-Id: I37e16b3c238f03306841713d0535eae5882b534d
2019-10-17 12:08:01 -07:00
Winson Chung dd9d1ea1bf 12/ Clean up some ActivityInterface calls
- Require users of the activity interface to go through the interface to
  get the raw activity
- Remove calls that pass in the activity since the interface already can
  get the reference to it internally (and the interface always has the
  reference before the caller)

Bug: 141886704

Change-Id: I13e52caba593db918e8a7764c751044142fe7ece
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-16 17:18:12 -07:00
Winson Chung 981ef3a88a 11/ Update MultiStateCallbacks to support multiple callbacks
- Allow multiple callbacks to be set for the same state
- Expose method to set state on ui thread directly
- Ensure callbacks are made immediately if the state is already set
- Clarify that the one shot callbacks vs the state listeners

Bug: 141886704
Change-Id: I8ea0dcd2821ee18d071706eaddeb2852afa13f30
2019-10-16 17:18:11 -07:00
Winson Chung c80b3224aa 10/ Migrate shared state to the gesture state
- Instead of a shared state which is written into, gestures update their
  own gesture state and that state is passed to the next gesture.
- The existing shared state encoded the final end target (which is
  currently directly correlated with canGestureBeContinued). If we move
  the end target calculations to the GestureState, the handlers can listen
  for those changes and we can use the previous gesture state to decide
  which consumer to choose.  In addition, we move over the interrupted-
  finish-launch-task id.

Bug: 141886704

Change-Id: Icb6a3815c16b23692dbcde316114bd3cea06634e
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-16 17:17:34 -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
Winson Chung 9196cb11a2 8.5/ Follow up to comments from previous CLs
Bug: 141886704
Change-Id: Ib583753e35e57eab3b1cc413a0f910cf10142e42
2019-10-16 17:17:34 -07:00
Sunny Goyal 17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -07:00
Winson Chung d7269bf8b6 8/ Rename ActivityControlHelper
- ActivityControlHelper -> BaseActivityInterface
  LauncherActivityControlHelper -> LauncherActivityInterface
  FallbackActivityControlHelper -> FallbackActivityInterface
  QuickCaptureTouchConsumer -> QuickCaptureInputConsumer
- Move gestures to use the activity interface from the gesture state

Bug: 141886704
Change-Id: I6f12daeb03d564143404767dfe4576e3e5da2a1d
2019-10-08 13:39:13 -07:00
Winson Chung d3da92ac66 7/ Rename RecentsAnimationWrapper
- Move the recents animation classes out of util into base quickstep pkg
- Clean up some local var names

Bug: 141886704
Change-Id: I1556179e203cbb43b77ea58e6fe520aa9944099b
2019-10-08 13:30:27 -07:00
Winson Chung 9e876a34ee 6/ Update recents animation classes to have their respective responsibilities
- RecentsAnimationTargets: manages information about the targets only
  RecentsAnimationCallbacks: manages callbacks from WM about the animation
  RecentsAnimationWrapper: manages calls into WM to update the animation
                           (to be renamed accordingly in a follow up CL)
- Create the Callbacks as a part of starting the recents animation, and
  have the callbacks create the controller wrapper and the targets, which
  are both notified to the listeners through the callbacks.
- Instead of passing through a callback for recents animation finished,
  have it be a part of the recents animation callbacks.

Bug: 141886704

Change-Id: I4ff26a175654e82efe059fa74d1f310e93961dc9
2019-10-08 13:15:15 -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
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
Winson Chung 75eb0e0f20 2/ Move device state logic to its own class
- Feed the class down to the input consumers and related gesture classes
  instead of specific sysui state flags

Bug: 141886704

Change-Id: I2ade7f48555c9d0ba0d3fac5c1f2dae694624224
2019-10-07 20:49:08 -07:00
Winson Chung 92a015f2fc 1/ Renaming some classes for clarity
- SwipeAnimationTargetSet -> RecentsAnimationTargets
- RemoteAnimationTargetSet -> RemoteAnimationTargets
- RecentsAnimationListenerSet -> RecentsAnimationCallbacks
- SwipeAnimationTargetSet.SwipeAnimationListener -> RecentsAnimationCallbacks.RecentsAnimationListener
- ClipAnimationHelper -> AppWindowAnimationHelper
- AssistantTouchConsumer -> AssistantInputConsumer

Bug: 141886704

Change-Id: I78485a1651bb360ffbac2d0c462855931a995ee1
2019-10-07 20:49:08 -07:00
Tracy Zhou cdb72146e8 Handle app switch in Overview
- Transfer screenshot from WM to launcher when recents animation gets cancelled due to stack order change
- Transform two live windows when app open animation happens from recents

Fixes: 139258979
Fixes: 139259253
Test: switch task in overview

Change-Id: I80bafb8d45b9250fda937223254e365596a7f538
2019-10-03 16:53:43 -07:00
Becky Qiu d53cb6333f Merge "Fill in LauncherTarget fields with values extracted from LauncherLogProto.Target." into ub-launcher3-qt-future-dev
am: 4a4755fc70

Change-Id: I6435b1e475b7a39e68a78dc893c2a6cc4f2b8d72
2019-10-02 16:36:52 -07:00
Sunny Goyal e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07: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 2cb71ee386 Update all apps fade interpolators for home <-> all app
am: c449a6417d

Change-Id: I34b27a6ec2c62fe657804e7e9f027e21a26568c9
2019-10-02 13:28:08 -07: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
Sunny Goyal e84c5b82be Unifying activity tracker callback
> Using a common class for both Launcher and RecentsActivity
> Removing static refenrece to LauncherModel and using a common pattern for
  tracking activities

Bug: 141376165
Bug: 137568159
Change-Id: Ic1897abe6913ec78e25725118eedf5b468d5ec70
2019-10-01 13:54:26 -07:00
Samuel Fufa db202abe4e Merge "Fix ScrimView caret alignment and ignore touches" into ub-launcher3-qt-future-dev
am: d69327e9c0

Change-Id: Ia19d766bdeb5d2a4023b1c408bddfe30e4de4dac
2019-09-26 17:38:25 -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
Winson Chung 280242e5dd Merge "Updating launcher interface for recents animation change" into ub-launcher3-master 2019-09-24 05:26:59 +00:00
Winson Chung eff177a7f2 Fix wrong check for debug mode
Bug: 140246642
Change-Id: I4ce7cf623fe31d53fd9f6506f339d51a64ed8f8d
2019-09-23 20:11:43 +00:00
Winson Chung 1b231ecc56 Updating launcher interface for recents animation change
Bug: 140626334
Change-Id: Ib8e837c157bb99db429b7936fdf111e05170ac25
2019-09-20 15:15:43 -07:00
TreeHugger Robot 3a5d7cca9e Merge "Updating animation start callback" into ub-launcher3-master 2019-09-20 21:31:20 +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
Winson Chung f779e78789 Updating animation start callback
Bug: 140626334
Test: Builds
Change-Id: I86e8d448188d21f0318ac2ea053a8394a1d0cf1a
2019-09-20 17:40:17 +00:00
Sunny Goyal eb71cef629 Playing wallpaper animation if Launcher is destroyed
Bug: 140539007
Change-Id: I6573eafda353f4f399768613ef068de86c8f37f4
2019-09-20 09:53:47 -07:00
Winson Chung a879f9c481 Adding binder tracking support in tests
- Whitelist specific binder calls when handling touch during swipe up
  gestures
- Only track binding for touch handling and certain launcher lifecycle
  changes for now

Bug: 140246642
Change-Id: I6ba30280dd17da358662870f8719ae851536ad8b
2019-09-18 17:08:05 -07:00
Hyunyoung Song 338e4ea7df resolve merge conflicts of 057059665e to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I8a92d1389acbefc5bf33ef9760373bfbf54d682b
2019-09-16 15:29:37 -07: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
Sunny Goyal 3e3d759db2 Removing flag overrides. All flags should be defined as togglable flags instead.
Change-Id: Ia7b9ff84413096cd5b0c4a9a81a232019f2522d2
2019-09-12 10:17:14 -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
Sunny Goyal b1d7de25f8 Adding support for overlay and corresponding plugin to Launcher
Updating various task callbacks to handle overlays

Change-Id: I80077508ad35c31269c873f51f0105302a9e6a5d
2019-09-10 08:08:28 -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