* End the recents animation and then relaunch as if
from scratch
* We explicitly ignore the anim for end of recents animation
since that will cause the taskbar to quickly show and stash
again, and we know in this case that we'll quickly be launching
right back into an app
Test: Tested w/ live tile + non live,
fullscreen + app pairs
Bug: 316485863
Change-Id: I6ae8cccc01401935bf96fba8a154216e6b1ad701
The revert was not supposed to be auto-merged.
This reverts commit 5a3bf93d82, reversing
changes made to 84f8002586.
Bug: 331384026
Change-Id: Ieb11a8544db90259aae856c4af805c37ce9e68cc
This reverts commit 176f186a6d.
Reason for revert: DroidMonitor: Potential culprit for http://b/331438065 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: Ie375277ad2f65199749f0211ab50037d4b37e664
Merged-In: Ie375277ad2f65199749f0211ab50037d4b37e664
Taskbar All Apps exists regardless of the default launcher. Thus, we can
toggle it on large screen devices. This CL ties registering the system
action to default launcher and taskbar's enablement.
Test: adb shell input keyevent 117
Test: AllAppsActionManagerTest
Flag: LEGACY ENABLE_ALL_APPS_SEARCH_IN_TASKBAR ENABLED
Fix: 317259709
Change-Id: I26f0ed9e921beac762f3f9e6aaceb1002ad4801a
(cherry picked from commit c113b277e6)
Updated KQS to allow launching tasks through OverviewCommandHelper to allow launching the overview task without it having focus.
Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 324888738
Fixes: 324904244
Test: used enter and tap to launch tasks in KQS
Change-Id: I6de38ceea22c362a52a420c8ba0165ba23e5c862
To fix the taskbar stash delay when launching an app, ag/18875100
sets the state so that the taskbar stashes immediately after
app is launched.
Since we cannot know if the app is translucent at that point,
we have to check after the animation is started so we can update the
launcher visibility state.
Bug: 314792981
Flag: ACONFIG ENABLE_HOME_TRANSITION_LISTENER TRUNKFOOD
Test: HomeObserverTest
Change-Id: Ifc3a6559d7a8c6fda4c08a0fc2d6791da46b38d6
* Now we log the original source of the first selected app
as soon as the user selects it (previously we only did when user
selected second app)
* We log the item info for the second app to determine second
surface.
* Added new metrics to log after user has started a split session
and ended a split session
* We log different cancellation reasons (cancel button,
home gesture, general other app interruptions, etc).
* One KI/Bug: When the second app is selected via taskbar in
overview, the container will say hotseat because we are using
Launcher's logger and not Taskbar's. Taskbar's logger manually
overwrites the container in TaskbarActivityContext, we may be
able to make something hacky that can allow us to overwrite, but
that'll have to be a separate change
Bug: 322551862
Test: Logged metrics manually with event and itemInfo
Change-Id: I177623fd00ce62acf2d4ee983b58561d8c946d59
Updated the KQS app launch animation to match the spec: translate the launching app from the left (right in RTL) and translate the closing app to the right (left in RTL)
Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 313606549
Fixes: 313607264
Test: launched tasks from KQS from home and launched app
Change-Id: I0e903c741e4f930b377607b7eaf42a87177c3eb6
This CL changes findLastActiveTasksAndRunCallback to return a fixed array rather than an ArrayList.
1) This fixes a (minor) crash with app pairs, where we performed get(0) on an empty array when no running tasks were found.
2) This also fixes a live bug where app pairs would launch apps in the wrong order if app 1 was not found in running tasks, but app 2 was.
The function should be more robust now, preserving the indexing of the input keys.
Fixes: 316053131
Test: Clear all tasks from Overview, launch an app pair, launch succeeds
Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Change-Id: I51d8ba823a2ec57e9ecfeede956e0afce1d653f4
This fixes the bug where the flag gets set when user taps on nav handle, which
results in the taskbar animation playing.
Flag: N/A
Test: open app
wait for taskbar to finish stashing*
tap on nav handle
nothing happens (desired affect)
* I will address tapping on taskbar while its animating in a separate change
Bug: 292108880
Change-Id: I75870050225bdd951c69224d272d0bd5a3d6d4ea
[App Pairs 8/?]
This CL adds taskbar functionality for app pairs:
- Ability to drag an app pair icon to Taskbar
- App pair launch from Home Taskbar
- App pair launch from Overview Taskbar
- App pair launch from in-app Taskbar
KNOWN ISSUES:
- Bug (b/315190686): if user is inside a running split pair and attempts to launch the same pair from an app pair icon on taskbar, Overview tiles get temporarily messed up (recoverable by leaving Overview)
- User can attempt to split with an app pair icon on the Taskbar. This should result in a "can't split with this" bounce animation on the SplitInstructionsView (to be implemented). Currently does nothing.
Bug: 274835596
Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Test: Manual
Change-Id: I5256547af236fc2deeb192d60bfe1f2b7ddc5647
This change introduces a motion event flag to signal that the gesture
is being originated over the bubble bar (similar to the nav bar gesture flag). Downstream consumers use this flag to ignore the event in order
to allow the bubble bar to handle it.
The black screen in b/293348900 seemed to be related to the recents
shell transition closing the app that was in the foreground before
swiping on the bubble bar handle. Not sure why it ended up with a black
screen, but this change avoids starting the recents transition entirely.
Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/BSxLROoflr1i2yy0v6Y4G
Fixes: 294421126
Bug: 293348900
Test: Manual:
- Add bubble to the bubble bar
- Swipe up over the bubble bar
- Observe that the bubble bar expands
- Launch application
- Swipe up on the bubble bar handle
- Observe that the bubble bar expands
Change-Id: Iea15829de97edb6bfbfb7007388865230faaf736
When the bubble bar becomes visible the space between icons in the
hotseat is now adjusted. This change only does it when the QSB is
above the icons, but this will be changed in the future to be based
on the amount of space between the hotseat and the edge of the screen.
When the hotseat is adjusted, the new width is smaller by the size of
2 icons. The icons are then translated to be evenly spaced within the
boundaries of the new width.
Since the adjustment is only applied when the QSB is above the icons,
it is resized accordingly to the new width.
All visual updates currently snap to the new position, but will be animated
in a follow up.
Demo: https://recall.googleplex.com/projects/3391fc5c-599d-4827-b6f8-d2deb160aa99/sessions/fad1a5c5-e9cf-4586-92e4-1e92df3b002e
Bug: 280494203
Test: Manual (on tangor)
- Set device to landscape
- Make the bubble bar visible by adding a bubble
- Rotate to portrait mode
- Observe that the hotseat is adjusted
- Rotate to landscape
- Observe that the hotseat adjustment is removed
- Rotate back to portrait
- Observe that the hotseat is adjusted again
- Dismiss the bubble to hide he bubble bar
- Observe the hotseat adjustment is removed
Change-Id: I5b02a60b6cb301ffa2507a6d825c748a782cca18
This is the third of several patches implementing the App Pairs feature behind a flag.
This patch includes:
- AppPairIcon and associated XML. Actual icon asset is placeholder for now
- Ability to launch split pair on click
- Icon can be moved around, incl. to Taskbar
- App pair can be deleted by dragging to "Remove" drop zone
- Icon persists on Launcher reload
Change-Id: I88aec6fbc814be98f9ef048bbc5af889d0797970
Flag: ENABLE_APP_PAIRS (set to false)
Bug: 274835596
Test: Not included in this CL, but will follow
ItemInfo.getTargetComponent is nullable, so we can't always create a ComponentKey. Added a null-check and proper creation of ComponentKeys
Flag: not needed
Fixes: 286053950
Test: started and completed splitscreen selection from home, taskbar and overview
Change-Id: Ifa30f194ae064fab8aad79c5116f8c859dfd8cf1
This patch makes it so that the transient Taskbar cannot unstash when in 3P launcher.
Previously, the user was able to unstash Taskbar when in 3P launcher, causing a janky-looking UI (3P launchers may implement their own version of Taskbar on the home screen. This also caused problems with certain Taskbar commands like split screen, which provide an entry portal to Pixel-specific implementations.
Fixed by forcing the Taskbar to stay stashed when a 3P Launcher is displayed. The Taskbar is still usable inside of other non-launcher apps. This was done by using TopTaskTracker to check for ACTIVITY_TYPE_HOME or ACTIVITY_TYPE_RECENTS, and disabling Taskbar when these activities are running.
Fixes: 277963491
Test: Manual
Change-Id: Ifc0f3c07e3b76eb610f93205978fbc596bab6253
- The previous call from TaskbarLauncherStateController caused a
regression due to the inability for the code to distinguish
Normal -> Background -> Normal when tapping on the bar area
or from failing to launch a task, so both cases were triggering
the resumed state to cycle and start an animation. For now we can
only handle the task-launch fail case.
Bug: 268448123
Fixes: 281966662
Test: Quickswitch to an activity that finishes when resumed
Change-Id: Ie4692dd85252540ff47633978c0e6e4adbb1bdd0
The fix caused a flicker tests to fail, but that is specific to the persistent taskbar used in tests only.
Bug: 277470898
Bug: 277003116
Fixed: 277470898
Fixed: 277003116
Test: Flicker tests passes
Test: Manual (http://shortn/_kiAZykhZsp)
Test: Tapl presubmit tests
Change-Id: Ib9daebf3b06af2f1a4a3b7461acf91f204ff281b
This patch fixes a bug where split screen did not fully support launching intents with different users.
The bug arose because SplitSelectStateController only had one place to store user information about the staged intent, mUser, but this disregarded the fact that the secondary app could also be passed in as an intent, and could belong to a different user from that of the initial app and the existing context. We need to support this case now since we now allow second-app selection from Taskbar.
Fixed by splitting the field into mInitialUser and mSecondUser, which will be tightly bound with mInitialTaskIntent and mSecondTaskIntent to make sure that Intents are always launched with the correct UserHandle.
Change-Id: I1ec49c75d562e4309a41d98010f0eff113c81e9d
Fixes: 275410160
Test: Manual
Merged-In: Ic904672769be8fd116180d457b36eb567c5ee304
The unstash is ignored by TaskbarStashController, while the TaskbarLauncherStateController positions the hotseat on the launcher correctly without animation.
Since the TaskbarStashController is used even with 3p launchers, both of these actors keep track of whether the device is locked independently, based on the SysUI flags.
Bug: 270139677, 266890635, 274084408
Test: manually, Tapl
Change-Id: Iae94522b5d57cc89c9a4d219ad1254b150a3400d
This change caches whether launcher was active at the time of the screen
off, and assumes this last state when the screen is actually off.
While trying to understand the code, I renamed a couple class-internal
methods and flags, plus added comments. If they are not accurate, its
due to a misunderstanding on my part, and I will gladly revisit and
check whether all the assumptions I made still hold.
Bug: 261418621
Test: manually
Change-Id: I2ad25caf478100781a063c356c5fd2d20d3e1917
Merged-In: I2ad25caf478100781a063c356c5fd2d20d3e1917
Bug: 246635237
Test: open app in hotseat
close app in hotseat
the 'matching' view in taskbar should be hidden
tested icon, predicted icon, folders in taskbar/hotseat
Change-Id: I74382480826afafe6ae58e78faf26fe10812e29b
This patch fixes a bug where Taskbar would not differentiate between user profiles when selecting an app to launch from Overview.
The bug occurred because findLastActiveTaskAndRunCallback(), which checks for already-running tasks when launching an app from the Taskbar, only checks for a ComponentName match and not a userId match.
Fixed by making the findLastActiveTaskAndRunCallback() also check for a userId match.
Fixes: 270456926
Test: Manual
Change-Id: I43ff06083a5dce775fdbd0b0ed951beaae34c0ab
* Moving things out of RecentsView to avoid
dependency on a non-testable class
* Also helping prevent bloating RecentsView.java
Bug: 266482558
Test: Single Chrome instance in recents. Initiate split
with Chrome from workspace, tap on Chrome again in Taskbar,
ensure no crash.
Change-Id: I99ec704479ffaa860f4d80c2cb9f54182f31f41a
- Added support for escape(backtick on some keyboards) keyboard keys
- Added support for d-pad left and right keyboard keys
- Fixed janky behaviour when quick switching too quickly.
- Removed unused code
Bug: 269618928
Test: Tried quick switch very quickly, tried escape, d-pad left and right keys in RTL and LTR modes
Change-Id: Ie03207cb349891e9c2de18502f3f65b7c8f9c018
- We need to reset icon alignment whenever icon layout bound
changes. This fixes the issue where we build an icon
alignment animator before any of the views are laid out.
- Separated animation logic between.
createTransientAnimToIsStashed and createAnimToIsStashed
* The values still require a bit more tuning but this gets us
a lot closer to spec for many of the motion polish.
Bug: 267806083
Bug: 246634367
Bug: 246635237
Test: manual
Change-Id: Id122134b22ef4e418ce632e4a8137239dc8bb313
Adding KeyboardQuickSwitchView and associated flows.
Test: Manually tested alt-tab and alt-shift-tab in and out of overview on a tablet and phone
Bug: 258854035
Change-Id: Ifb48b005067b3a9c66acfd5ecdbae144b359d3be
Preparatory change for adding the KeyboardQuickSwitchView and associated flows.
Test: Manually tested alt-tab and alt-shift-tab in and out of overview on a tablet and phone
Bug: 258854035
Change-Id: I468481a023e82d3ef7c7d4d44c5b9435173b49ae
This change is a minor cleanup to make a function more streamlined.
Bug: 265244769
Test: Manual, confirmed no regression
Change-Id: I557246a7633b10701adf75aaba6930f25e1c30aa
This patch makes it so that the correct task will be chosen when selecting a second splitscreen app via Taskbar.
Prior to this patch, the Taskbar app selection function -- which attempts to match the tapped icon to a running TaskView -- assumed that the TaskView in question was always a solo (non-grouped) Task. This resulted in the wrong app being selected for split when the desired Task happened to be the secondary app in a pair.
Fixed by checking to see if the desired app is primary or secondary, and returning the correct Task, IconView, and ThumbnailView for the split operation.
Fixes: 265244769
Test: Manual
Change-Id: Ie1122d1b49151d70dec9711fe558fba7752b7d8e
This patch fixes the following user flow:
1) App is already running
2) User initiates splitscreen from Home with that app
3) User selects the same app from Taskbar or AllApps
Previously, this caused a crash because the split-from-home initiation removed the corresponding app tile, causing a null pointer exception when the same task ID was used as a split target.
Fixed by adding a null check: if the target TaskView can't be found for any reason, fall back to launching the second app via Intent instead. If the app doesn't support multi-instance, the UI will now show an attempted split, followed by the message "This app can only be opened in 1 window."
Fixes: 263041522
Fixes: 266218404
Test: Manual
Change-Id: I39ed60c9ac758ac215391f0618f44f7fcee4f32c
* Consolidated init calls in SplitSelectStateController
* Also add support to launch from taskbar all apps
* Add logic in SplitSelectStateController to know whether
or not we need to dismiss existing TaskView vs relying
on mSplitHiddenTaskView null check
* Default click handling for SplitShortcut is to start
split selection mode
Bug: 251747761
Test: Initiated split from smart actions, thumbnail app
icon, home, taskbar in overview, all apps. Saw it choose
the latest thumbnail
Change-Id: Ib4f64e619c97615af458a19a9c0efd86c92979d9
This patch fixes a bug where Taskbar launches (tapping an icon on the Taskbar) were not executing correctly in Overview.
Now that Taskbar is always present in Overview, we need to handle cases where the user taps to launch an app, but the app is already visible to the user in Overview. This was breaking in a noticeable way with split apps, where the Taskbar simply wouldn't respond when the tapped app was already visible as a live tile.
Fixed by polling RecentsModel for already-running tasks, checking to see if the associated TaskView is visible to the user or not, and calling launchTasks() on the TaskView if so. If the tile is not visible to the user, the app will launch normally.
Fixes: 261952204
Test: Work in progress
Change-Id: If761546913bde7451a22456a272ba6c31942c5f8
- During gestures from taskbar all apps, unstash immediately in
transient.
- Overlay closes sooner if all apps is open (still done later for EDU).
- Taskbar stashes in overview when All Apps is opened.
- Transient app-window threshold is ignored if All Apps is opened.
Test: Manual
Fix: 262076812
Change-Id: I46b2dcdc75ee0cc15c1b47da2139ff8c20cf618a
- Transient taskbar nav threshold now works in overlays.
- Delay closing overlay to transient app-window threshold if necessary.
- Persistent taskbar no longer stashes for EDU overlay.
- EDU overlay provides enough bottom padding for transient and
persistent taskbar.
Test: Manual
Bug: 217261955
Change-Id: I2ae5612ef70a6d09e22f83f8117cdbf2a0a053b8
Fix: 260769010
This patch makes it so that when the user initiates a split from Home, a running app instance is used instead of always attempting to spawn a new Intent. If no matching app instance is found, behavior is unchanged.
Previously, splitting from Home always resulted in a new Intent being staged, which ignored the fact that an app of the same type could already be running. This resulted in undesirable situations like being able to attempt splitting an app with itself in Overview.
Fixed by querying the RecentsModel when a split of this type is initiated, checking to see if there is a running task of the desired type, and using that to perform the split operation if one is found. When Overview is loaded, applyLoadPlan() will now check to see if there is a staged task, and remove the associated tile as needed. If the removed task is part of a pair, this involves creating a temporary TaskView to hold the other task.
Also fixes a bug where using the Taskbar to select one's second app would incorrectly choose the oldest instance of a multi-instance app rather than the newest.
Fixes: 257513447
Fixes: 259936298
Test: Manual
Change-Id: I97a62f34c03aa4980f9cd743e35e9fc6ef4c092d
- Added isHotseatIconTopWhenAligned to control both iconAlignment and stash animation to just fade in if hotseat icon isn't on top of the screen in the aligned state
Fix: 257355864
Fix: 213455090
Test: Launch apps from/back to home, taskbar animate from/to hotseat
Test: Launch apps from/back to AllApps/-1, taskbar fade in/out
Test: Repeat aboth with transient or persistent taskbar
Change-Id: I6bdae615ff9e199d23cbfe2d26c8d46a08fbc436