- Also make spacing between buttons always 36dp
- Updated screenshot button image for Launcher3
Fix: 208384949
Test: Start overview in Launcher3WithQuickStep, test screenshot button is working
Change-Id: Ieb60ce134813202c1d14137fff0a131e1f5f8c96
- If SysUI is restarted (ie. during dev or a crash), the components
registering the shell listeners may not be aware of this, and
listener callbacks will not be re-registered. Currently all the
listeners are managed correctly (bound & later unbound) so we can
just keep the active listener references to re-register if this
happens.
Bug: 207142749
Test: Kill SysUI, start some apps and ensure Launcher still shows them
in recents
Change-Id: I47665180bbff3a12b12686e2ca3063ecd188bb56
* "And I would have gotten away with it too
if it wasn't for you meddling [matrices]"
Fixes: 208360236
Change-Id: I1607a19c81830f6a037d2337ee1d9e944096e0ac
- Set resumed state immediately when finishing recents controller to launcher, otherwise there's a race where we start animating gesture state to 0 before animating resumed state to 1, which causes the jump in the bug
Test: Swipe from app to home 10 times, no jump
Fixes: 203725820
Change-Id: Ie8a1add29902a9961ba4d7861ba5424ab656f1c8
Disables fold/unfold animation for QSB and hotseat
icons when in portrait orientation. Launcher workspace
icons and widgets are still animated intentionally.
Reuses NaturalOrientationRotationProvider which is currently
used to disable fold/unfold animation in the status bar when
in non-natural orientation.
Bug: 201518277
Test: fold/unfold on launcher in landscape =>
QSB and hotseat animated;
rotate screen during fold/unfold animation =>
translation reset after rotating to portrait,
animated after returning to landscape;
rotate after fold/unfold animation => no changes
Change-Id: I8ed405b09f445f554d7638ab44393c90773e0bb6
Instead use setTaskbarViewVisible directly. Now that we stash when going to overview, we shouldn't have any launcher state where we need to fade out TaskbarView icons
Test: quick switch from home (follow up CL)
Bug: 194728611
Change-Id: I03e1fa4037b7e8a08494f6b7e065d144c4bc4e1b
- Also do the same in setState without animation
Fix: 208605204
Test: Exit split screen and enter overview
Change-Id: I34dd102527dffa90925b6f0fd22465f1fe6e819c
- So it'll have exact same behavior as OverviewState to exit overview when going back
- Also removed RecentsView.cancelSplitSelect as it's longer needed
Fix: 181707736
Test: manual
Change-Id: Ide4dfc64680ecc9adfe245ae2de1463735b0490e
* Schedule runnables to clear pending queue in
OverviewCommandHelper similar to how TaskView does it.
* End callbacks get run when recents animation finishes in
RecentsView in the case of live tile when recents animation
is still running
OR
in directly when the split remote animation finishes
Bug: 207845542
Change-Id: I7e858ce55b08cde6436d44f2e857e28b73458f0b
* Since we're doing all transformations in screen
coordinates we don't need to account for RTL.
Bug: 202156862
Change-Id: Ibcbf698dbc5b8fabf2647949de6d2718937832d5
We built this method so that the window would have
something to fade out on top of. But with longer icon loading times,
this causes a buggy experience since the window is opaque
for the entire duration of the animation.
Having the window always fade out is a better UX for now.
Next step is to always init the FloatingIconView with the
in-memory icon, and then possibly caching both layers
of AdaptiveIcon.
Test: restart phone, swipe up to home
restart phone, back swipe to home (This flow never called keepWindowOpaque)
Bug: 207389002
Change-Id: Ida64829c60881786ed91e8641cdf7a278b37e201
There is a NullPointerException when trying to get the
length of the array.
Test: Manually tested
Fix: 206040100
Change-Id: I69a03fd3658094655eaf97fa21039fd373ee37d5
- Generally close all floating view when starting home from Recents
Bug: 193432925
Test: with 3 button, open task menu, then press home
Change-Id: Ic99c50333c797f222fc8e682fd0f3fcc4d641d47
Temporary fix for S. Leaving the bug open for a proper fix in T.
Since we reverted the z order back (launcher on top), we should apply this fix from S and find a proper solution in T
Bug: 189265196
Test: https://screenshot.googleplex.com/75fgCva736rqwg5
Change-Id: Ice3b189a41f759e090334e360e44543eabc4836d
(cherry picked from commit 26f47c711a)
The dismissal animation doesn't return the translationY to 0, but resetTaskVisuals does.
Fixes: 207782306
Test: Drag live tile to dismiss lightly so it doesn't succeed. When it comes back, make sure it matches the cutout.
Change-Id: I64ee06ad72c403ab4fdd4671d08b1843a3e89253
We reused a code that handles rotation suggestion button
from SysUI in Launcher. It requires WRITE_SECURE_SETTINGS
permission to write how many times we have shown this button
to show ripple only the first 3 times.
AOSP Launcher didn't have this permission and it was crashing.
Bug: 205491152
Test: tap on rotation suggestion button when in AOSP launcher
Change-Id: I216abb86d43cc505aec1ff581c1f332ae3ad0db4
- Removed overscroll checking in switch access, as overscroll isn't supported via snapToPage
- Don't show forward/backward action if no further scroll is possible
- When scrolling right in overveiw grid, snap to the next non-fully visible task
- When scrolling left in overview grid, snap to a position that next non-fully visible task is on the left of the screen
Fix: 204162346
Test: Use switch action in Workspace/Recents with and w/o RTL
Change-Id: I0d4f201edf2da543703e88420e6f3255fb2ba16f
Update resources in floating rotation button
when configurations such as screen density, screen size,
current locale have changed.
Bug: 200103245
Test: change display size, locale, fold/unfold
-> check that floating rotation button resources
are updated
Change-Id: Ia69f4f8b393a686012e286a1e39822650c562d52
- Reverted to before ag/16095449 where reset() is called after state transition completed
- Call pageBeginTransition in dismiss animation to make sure onPageEndTransition is triggered to clear mCurrentPageScrollDiff properly
- Fixed a condition in resetFromSplitSelectionState ot use DeviceProfile.overviewShowAsGrid, as when state is in transition, showAsGrid() would be false
Fix: 207744890
Test: manual
Change-Id: I5a812a7ee26df2f953f7fed0155880620d2c4e66
And use it in TaskbarModelCallbacks#commitItemsToUI(), which in rare cases can run during init() before other controllers (namely TaskbarStashController) have been initialized.
Test: call commitItemsToUI() in TaskbarModelCallbacks#init(), ensure no crash
Fixes: 204847702
Change-Id: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
Merged-In: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
- Added a casting check as an immediate fix to b/173838775
- Added logging to help debug the corrupt state where an item of type other than FolderInfo is used as an other item's container.
- Added LoaderMemoryLogger for adding large logs that are only conditionally printed.
Bug: 173838775
Test: manually checked logs
Change-Id: I9491cb421b9fb807d5fb110b04ad069481de768f
getTaskViewAt is used in two different contexts with different
assumptions:
1. In the context of iterating over the all TaskViews, where
the valid tasks indices are know.
2. In the context of requesting some TaskView by index, where
the caller expects null when the input index is invalid.
The nullability status of the method differs in these contexts
and therefore getTaskViewAt usage can be separated into two
different methods.
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I42c04c115c309f1849f9dfbb05c74b9b080acf13
(cherry picked from commit 4da3b4bdddbbff7a0dee1f57b3a74c616231e100)
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).
Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
- Don't reset mFocusedTaskViewId when focused task become split, so it's reset properly when it's added back to RecentsView
- Moved applySplitScrollOffset to RecentsViewStateController to be called after mSplitHiddenTaskView is added back to RecentsView
- Update scroll after going back from split
- Don't reset mSplitHiddenTaskView's translation as it'll clear the grid translations
Test: manual
Bug: 181707736
Change-Id: I4bd204fc537ee520216f875b3eddf4dc94f7bfd8
When opening a menu, a scrim with 80% alpha should be shown on top of
Recents view.
Align task menu second row with icon: when the menu shows up in the
bottom row in landscape, the menu should be aligned on the second row.
TODO: there is a RTL bug that I'm waiting because it also affects other
parts, not only this menu.
Bug: 193432925
Test: open Overview and tap the app icon
Change-Id: I6846ee937cb5e739e8be64d17045bc3b32e28e46
- If SysUI is restarted (ie. during dev or a crash), the components
registering the shell listeners may not be aware of this, and
listener callbacks will not be re-registered. Currently all the
listeners are managed correctly (bound & later unbound) so we can
just keep the active listener references to re-register if this
happens.
Bug: 207142749
Test: Kill SysUI, start some apps and ensure Launcher still shows them
in recents
Change-Id: Iba3b11ee972caf8f0b482942d38c3a7359211180
- This can prevent the layered content behind to not be visible (and
since launcher draws a cutout and the wallpaper isn't shown, may
result in a black rect. We only specialize for this case while
Launcher is in Overview.
- Also don't need to defer updating drawsBelowRecents, this can result
in the state not being reflected since it runs after the last update
of the transform params
Bug: 205789573
Test: Swipe up from app and ensure behind layers are visible (also
ensure this doesn't affect blur during the swipe or optimizations
after you leave overview)
Change-Id: I07689b3d9b65708797576e5fbefe12fb1f544119
* We were always passing in the same task no matter
which task icon was clicked.
* Use TaskIdAttributeContainer to associate
IconViews with their respective tasks
Fixes: 206154715
Test: Correct menu opens for split and fullscreen
tasks
Change-Id: I5f264bb69828532bdefffb7ec4b9ff1e501de086
- Removed DeviceProfile.allowRotation and use DeviceProfile.isTablet instead, which only uses current density to calculate its value
- Reverted default allow_rotation preference handling to before ag/14234761
Fix: 203817448
Test: isTablet is set correctly in different screen sizes
Change-Id: Ic6c8dfc774e7787f62d489ad27720a7644c1e8c7
- Instead of using RecentsViewScroll, put task's position offset versus current scroll as TaskRect calculation, so it's considered when calculating for putting task to full screen
- Revert back RecentsViewScroll to apply before RecentsViewScale
- Added new property in PagedOrientationHandler to apply both primary/secondary param without clearing the other, and renamed an existing method
Fix: 206972618
Test: Quick switching
Test: Launch task from grid, launch side task from carousel overview
Change-Id: I5977975ed1e930ad70b81d83513d8f3a00c0aed4
* AccessibilityNode actions are required to have a
unique resourceId to show as an action in A11y dialog.
For now, only AppInfo option is shown for each app in split,
but moving forward we'll need to add resourceIDs for
each option that can show up for either app.
Fixes: 200609838
Test: Saw multiple options for App Info for each app
come up in talkback mode
Change-Id: I92b349347354ac639537021d775eea814c866a0e
* Previously when starting the remote animation
we were relying on SplitPlaceholderViews to
animate into the proper place since we weren't
launching from the TaskView itself
* Now when launching from a GroupedTaskView,
we use the existing animation that handles that
animation in addition to showing the new split tasks
Fixes: 206608786
Test: Thumbnails animate from home -> overview -> launch
Change-Id: I1499ead7d90cd41e285ed0f4df66ea31f0dfbc95
* We weren't calling reset on the views
involved in split selection when recents view gets
a reset call (oops)
* Use device theme for split placeholder theme instead
of hardcoding to white
Fixes: 206155455
Change-Id: I3768fd574cb21eec9562d89c1a93eaa3f53d5ff1
- This makes sure TaskThumbnailCache fetch for thumbnail when its Bitamp is null
Fix: 206959035
Test: See steps in b/206959035
Change-Id: I03b574b0f8cc7390a8cad618bd810f44f0dee279
This makes the TaskMenuViewWithArrow open to the right of the icon if
there is enough space, and to the left if not. It also works correctly
in RTL, inverting the side to open by default.
Bug: 193432925
Test: open Overview and tap the app icon
Change-Id: Ib1098f48ed28d2e0758fb0e3fb733e86271fa1a0
* When swiping to QS from home, the
bounds for the rect on screen are incorrect
because it's technically off-screen when
it's being queried
Fixes: 206155441
Change-Id: Ibb17f2ac291f867b6de06041c980e434ce92cf27
Tint the buttons when taskbar isn't drawing a background (either due to alpha or offset).
Test: Dark icons on a light wallpaper on home screen, dark icons when light IME is showing
Bug: 204256643
Change-Id: Iae634a1b604f50edc102905abd0d812a43c5346e
* We were always passing in the same task no matter
which task icon was clicked.
* Use TaskIdAttributeContainer to associate
IconViews with their respective tasks
Fixes: 206154715
Test: Correct menu opens for split and fullscreen
tasks
Change-Id: I79a32541ea9ebae9ad78ad933f55212d0bc64b56
This makes the code more tidy and consistent with
other classes. Additionally, this allows for easier
annotation of the initialization code.
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: Ib7ecf32cffd5c6af67a4c2095d7cb3e3a2f387e4
(cherry picked from commit f50acd3ed855f21a4aca0d98ef9fc6c1099423d2)
This ensures the dismiss button is fully clickable even if taskbar is stashed.
Test: Stash taskbar, can dismiss keyboard by tapping anywhere on the back button
(Same with taskbar unstashed)
Fixes: 206851484
Change-Id: I06f86191e36b596a928c8db8d67a012be033daba
- This was causing bleed through between split tasks and perhaps
some rounded corners to be calculated incorrectly
- Also reset the translation after it is adjusted for dismissing
in case the dismiss gesture is canceled. This doesn't fix the
issue with bleed through between the task views (to be fixed
separately), but makes sure it isn't permanently set on the task
Bug: 206739664
Test: Split tasks, swipe up and check the bounds
Change-Id: I34430e958ca7a75f48621bc27a281e93fdf97179
- We will still need to figure out why, but currently the overview scrim blocks the cut out during transition. To go around this, we need to move live tile app after the overview transition animation is over
- Some of the logic in RecentsView is no longer necessary since we are no longer reusing live tile params and simulator, but assign new targets each time
Fixes: 205587164
Test: manual
Change-Id: Icadf26182112bba544a4103b626effa37d4028b5
- http://ag/16221737 ensure homescren stub is always added if tasks hasn't been loaded in RecentsView. This introduced an edge case that after dismissing home task view, no task remains in overview and it get dismissed
- The fix is to show empty recents instead of home screen if last task dismissed is a home task (showing empty recents isn't always correct, as there might be unloaded tasks, but it's better than dismissing overview)
- Also tuned the timing of when mLoadPlanEverApplied is set
Fix: 206462357
Test: FallbackRecentsTest.goToOverviewFromHome
Change-Id: I0f395639f57a1a57fddf750623a8a74b8ede8555
RecentsView getTaskViewAt method is nullable and is safe
to call for an out of bound index.
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I7709d63ad4490fd756a50caaf42ba70c4fad4d06
(cherry picked from commit 41edede1eed666fe9ffdfcd0d379d65252302e1e)
- Fixed calculateGridTaskSize to algin to taskRect instead of gridRect
- Extracted end of grid's scroll diff calculation to getOffsetFromScrollPosition to accurately calculate end of grid task's offset between its scroll and visual position (End of grid task's scroll is all the same at the position where ClearAllButton is just invisible)
- Extracted isGridTask in TaskView so TaskViewSimualtor can use the correct task size depedning if it's grid task or not
Bug: 200813202
Test: manual
Change-Id: I11a980345aee2680abf1c2563baadd9718a40192
Add @Nullable annotations for the fields that are expected
to be null at arbitrary lifecycle time and are their usage
is protected by null checks.
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I9c31e1dc0d01cdd68dfff0a005ba1f40c257f8ea
(cherry picked from commit 920dc2f28f81ce2aec07477dfb6f4efd8f91e4ad)
* There is a layering issue w/ live tile
* Also, order tasks for app-pair when binding
Bug: 205354856
Change-Id: I4fb5b9ed070e96299fd4b58d172ebba93789d009
Foldables use a different menu from phones, positioned either to the
right or left of the app icon, and display an arrow. Since TaskMenuView
is very specific for handhelds, it was cleaner to create another class
to handle foldables case extending from ArrowPopup.
This creates a working menu, the correct style will come in later CLs.
Bug: 193432925
Test: open Overview and tap the app icon
Fixes: 205298731
Test: atest NexusLauncherTests
Change-Id: I7a5c1fb4800a309f40fadb2df0f6c3a4c3f42679