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
If the window is unmagnifiable, it might cause the cutout of
magnification region.
To fix it, we set the flag when the touchable region is not the
entier window frame.
To fix NexusLauncherTests, we add a flag to avoid updateViewLayout
too frequently that would impact memory test and have the performance
issue.
Bug: 196510717
Test: manual test on gestural and 3-button navigation
presumbit test pass
run atest NexusLauncherTests with foldables
Change-Id: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
Merged-In: Ifef81640fe6c08ee1b0dcd3915227fba3002ea43
(cherry picked from commit c8d588cff6697ad2bd7eedd7e668f67a8d1ba9c1)
TODO:
- Consider delaying animating task bar to stashed towards all apps state until user releasing their finger (tho in this change heuristic is applied for stashing and unstashing respectively)
- Further consolidate some animation logic
Bug: 204220602
Test: manual
Change-Id: I58b4d035fcf65a9f5c68e69c129eae95b89b1c4a
- In FallbackRecentsTest.goToOverviewFromHome, home task gesture starts before applyLoadPlan, causing shouldAddStubTaskView to return false because getTaskViewCount is 0. This falsely avoid home task to be added to RecentsView, causing the animation to be drastically different from what user sees outside the test
- Added a check on whether applyLoadPlan is ever called to solve the problem
Fix: 205580523
Test: FallbackRecentsTest.goToOverviewFromHome
Change-Id: I2e435e56008e916e8f7e1037d3fa3c8177437d13
- Fixed an edge case that RecentsView was not snapped to last tasks, but become snapped to last tasks after dismiss, as last pages' scroll is the position where ClearAllButton is barely invisible, instead of aligned to mLastComputedTaskSize.
- Fixed a case that misclassifed as split select
Fix: 202941373
Test: manual
Change-Id: Ib50dda471189da4325cd8ed57d600cc64907c978
Bug: 200813008
Test: enter overview after activated split screen, observed task
thumbnails showing with correct bounds after roation.
Change-Id: Ifea17d2c685d16db111c4fab88e131595254b9a5
- Added popup menu support to taskbar icons
- Added item click handling for taskbar icon popup menu items
Bug: 198438631
Test: long pressed taskbar icons, pressed popup menu items, dragged taskbar icons to start multi-window mode
Change-Id: Ibc59c1eada50a877a863c075fbfd3e4accaae008
> Also finishing the activity so that it doesn't show in home settings backstack
Bug: 204541138
Test: Manual
Change-Id: I7deec0d1ef7eec0464a0f21bf30b25cd5e18d02d
This reverts commit 10eb3cd98b.
Reason for revert: Root cause of P0 b/205278434
Bug: 205278434
Bug: 193432925
Test: Local reverted and now launcher works on wembley
Change-Id: I3605c01066a3ce383d45e0a938f1e00b3c7f7bb9
Merged-In: I5ee18d3ee1b671fcaedda633e7a268addd5c5c15
- No change in behavior from today until groups are actually returned
from the shell
Bug: 202740477
Test: atest RecentTasksListTest
Change-Id: I4ac7b472ce2e0a3b2574dc6d8f4c1761a0ad993a
Merged-In: I4ac7b472ce2e0a3b2574dc6d8f4c1761a0ad993a
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
Change-Id: Icb068954e1e20a52d80c16c52d8e38ce9a181a8b
Merged-In: Icb068954e1e20a52d80c16c52d8e38ce9a181a8b
- Tuned the size and corner radius
- Tuned the margin from screen edge
- Tuned the vertical position
Bug: 204153113
Test: manual
Change-Id: Ibf3df599b31c7ecc2c9c951fc89e7e09c90253ef
- Launcher used to restart when density changes before http://ag/14234761, which added smallestScreenSize and density in configChange
- http://ag/14234761 aims to avoid restart when switching display in split dispalys, for which only size changes, therefore density is unnecessary in configChange
- Keeping density in configChange make Launcher acitvity to stay after changing display size, making all buttons stays in old size in previous denstiy, which is a bug
Bug: 204157738
Test: manual
Change-Id: Ib85326078c67c35d90dc5e9ae5c20eeb5286a610
The tests break on R3 and S5 devices.
Therefore the CL disable them temporarily until the issue being
resolved.
Bug: 205027405
Bug: 205014516
Test: disable tests that break ATP tests on R3 and S5.
Change-Id: Ib71c2f334d98445aeafa211d9bba2910d191b6fb
Revert "Do NOT MERGE Fix magnification border includes taskbar"
Revert submission 16003793-magnification_border
Bug: 196510717
Reason for revert: Caused NexusLauncherTests and NexusLauncherOutOfProcTests to stop running
Reverted Changes:
Ibbc9c51ea:Do NOT MERGE Fix magnification border includes tas...
Ida2bb5bf1:DO NOT MERGE Fix the cutout of magnification borde...
Change-Id: I6b2123aedd2a2f23142a34f158d2d9ab71948a18
If the window is unmagnifiable, it might cause the cutout of
magnification region.
To fix it, we set the flag when the touchable region is not the
entier window frame.
Bug: 196510717
Test: manual test on gestural and 3-button navigation
Change-Id: Ida2bb5bf120038ac9153e12790b93bdec195adbc
This CL implements a pressBack function to press back button or swiping
back in gesture navigation mode.
Bug: 199120092
Test: atest -c Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testPressBack &&
atest -c NexusLauncherTests:com.android.quickstep.TaplTestsQuickstep#testPressBack
Change-Id: I001cea17d09ae1ab7952d04ee394a2afa5bf1e67
- Extracted isAspectLargelyDifferent and use that to determine if letterbox inset should be cropped
- Always attempt to fit thumbnail width to avoid drawing area outside the thumbnail
Bug: 199743725
Test: manual
Change-Id: I2a7b20730055858b2376788e3a1fbbc66c0967e2
This logic was aim to prevent tablet device enable One-handed gesture
so added displayInfo.densityDpi < DisplayMetrics.DENSITY_600 before.
However, it seems this densityDpi=600 does not able to represent to
tablet device, instead we already have system property
"ro.support_one_handed_mode" which provides feasibility to config false
on tablet project, as the reason we can safe to remove this condition.
Bug: 203936659
Test: adb shell wm density 600 , and observe OHM gesture is available
Test: atest WMShellUnitTests
Change-Id: Ic7ae10e8a47d26b9bb39ab80e22d591d74f89ae5
Merged-In: Ic7ae10e8a47d26b9bb39ab80e22d591d74f89ae5
Rotating the device during the gesture nav tutorial cases the current step to repeat. This is unecessary after a successful gesture. Added some state tracking and handling
Test: roating the device several times while doing the tutorial and after successful gestures.
Bug: 204407899
Change-Id: I2f4102edc187137309f6231b88074f5db82ea0cd
Temporary removes usages of SysUI shared
resources as it leads to crashes in Launcher
tests.
Bug: 204727471
Test: install launcher, try autorotate suggestion
Change-Id: I1e3c1f5b331a22a753acc3fe0ee544d50fba5c18
Moves handling of floating rotation button when navigation
bar is not created to the launcher. This button was not
showing when taskbar is visible as it was initialized in
navigation bar (which is not created for large screens).
Bug: 200103245
Test: rotate phone when autorotate disabled on inner screen
Test: showing rotate suggestion when gesture nav enabled/disabled
Change-Id: I13dd555bcd811f1524be7ab9ad51b2b012b3b749
Also dispatch sysui flags to all controllers upon recreate, not just NavbarButtonsViewController. Additionally, tell the controllers to skip the animation due to the flag changes if it's fromInit.
Test: Enable themed icons, switch dark theme in quick settings, ensure taskbar updates
Fixes: 204403933
Change-Id: Ic43a50cf0456175f9beba5c29360440f051cbd2d
Test: Long press on bottom of taskbar to stash without moving my finger, ensure underlying app draws all the way behind the stashed handle
Fixes: 204165836
Change-Id: Ia1e138b9c369ac789e862ba760068f90bd64d312
* When in SplitScreen in overview, rotation causes
surfaces to get released, so we tell RecentsView
to null out references to them.
* Unclear why this wasn't/isn't neceessary for a
single, fullscreen task.
Fixes: 202780874
Test: Can rotate in split screen, no crash
Change-Id: Ifdfa74943945029edec37dfeeb4187616e4a23d8
- Disable the FastBitmapDrawable icon instead of setting it to invisible
- Suspend auto hide during drag and drop (moved to new TaskbarAutoHideSuspendController)
Test: Drag and drop from taskbar and ensure the original icon stays in place but desaturated
Test: Open immersive app, drag and drop from taskbar and ensure taskbar doesn't hide before drop
Fixes: 200816442
Change-Id: I4b895efd043be75e7e7034bd75e751ffdd2cfdd7
* Before the refactor to use RemoteTargetGluer,
we only set the preview if the runningTaskTarget wasn't
null, that check got removed during the refactor.
* Why that check was there to begin with is a bit
of a mystery, sadly
Fixes: 199658495
Change-Id: I053fac0fa0eee0979dff651c01287d04d06298e6
- Finish recents controller to app rather than to launcher, to ensure taskbar state uses in-app configuration
- Also fix an issue when a gesture completes before onLauncherStart, which happens in 3 button mode. The error I saw in the test was:
java.lang.AssertionError: http://go/tapl test failure: Failed to receive an event for the state change: expected [Overview], actual: [Background, Normal];
Context: want to switch from background to overview, clicking Recents button; now visible state is Background
(This also accurately describes what I saw on the device, where the LauncherState went to Normal but the task was still running in the live tile)
Test: testStressSwipeToOverview
Fixes: 203577620
Change-Id: I19616f7921c9821f1b45a90a3e4bec4fb3b8a9d3
Test: ran the hotseat edu on folded and unfolded foldable device in portrait and landscape mode and in three-button and gesture nav mode. ran hotseat edu on regular phone
Fixes: 203734732
Change-Id: Iea2140c8241cdea60cb5db37fbfb7f7701d63bd6