This CL adds a layer of OnBackPressedHanlderRouter to Launcher:
1. 4 OnBackPressedHandler(s) are added in such order: auto cancel action mode handler, drag handler, view handler and state handler
2. first handler who can handle back will handle the entire back gesture
3. Let WidgetsFullSheet to handle widget to all apps transition
Bug: b/260956481
Test: manual
Change-Id: Idbce3dcec746226dd68aaabaddc8fe01334e9673
When transient taskbar is opened, launcher state updates to background
and then quickswitch. Quickswitch launches the last task which is the
DesktopTaskView when desktop tasks are visible.
DesktopTaskView launchTasks is called which ensures that desktop tasks
are visible on top again and launcher state updates to normal.
If launcher state moves to normal with animation, the task views for any
visible desktop task flicker on screen. To remove this flicker, stop
animating state transitions when moving from DesktopTaskView back to
home screen.
This can be readdressed when implement a proper recents animation.
Bug: 263264985
Test: enable transient taskbar, put some tasks on desktop,
swipe up to show transient taskbar, observe no flicker
Test: have some tasks on desktop, swipe up to overview, click on desktop
tile, observe they are brought to front
Change-Id: I6ee5c55d9b805d6ef6d58ea137e697ccd40cda29
This is eventually allow us to move all register to background thread
Also creating a single ScreenOn tracked which is used at multiple places
Bug: 264465756
Test: Verified on device
Change-Id: Ibadf9ca43218e578954420d97a733adfa0a94fc7
Merged-In: Ib410e5bf02773cefde5bf0a0a1f2f1c108718d24
These new assets are better at looping than the previous ones.
Followed go/sysui-illustration-eng to map from dark to light colors
programmatically. Handling the mapping in code is preferred over having
separate lottie assets for light and dark theme.
Test: Manual
Bug: 263157739
Change-Id: Ia3cd2a1e7d349188d182d796ba927f1c513d4716
Since this tooltip looks and behaves differently than the existing EDU
sheet, it has its own view and controller implementations (I also may
have wanted to write some Kotlin).
To keep transient taskbar open while on the second EDU step, another
autohide suspend flag is defined. Additionally, special casing is added
to avoid hiding transient taskbar if autohiding is currently suspended.
Tooltips use the same assets as the bottom sheet for now, and are scaled
down to fit the tooltip dimensions.
Reset `Taskbar Education` in Developer Options to try EDU again.
[Demos]
- First: https://screenshot.googleplex.com/ASBeGvrb2EA5wEF.png
- Second: https://screenshot.googleplex.com/7fnfcTh9bMYezDc.png
Test: Manual
Test: Open app, see swipe-up tooltip.
Test: Swipe up to show transient taskbar, see features tooltip.
Bug: 263157739
Fix: 258460203
Change-Id: I473f5fccbae279db0614763b640da0a120b6b7f7
Desktop tasks are using freeform windowing mode. Update recents
animation to support freeform tasks when desktop mode feature flag is
enabled.
Changes:
- set initial size for freeform tasks to be the size of the thumbnail
instead of size of the screen
- support multiple individual remote animation targets when starting the
recents animation
TODO:
- there are flickers when starting and ending the recents animation
Bug: 263264985
Test: swipe up when more than 1 desktop task is visible
Change-Id: I27ee02774281b3a433d779c0bb8825cdb6ea5457
The atom was output also when swiping from the bottom to open overview. Now, it's only reported on horizontal swipes between tasks.
Fixes: 265790869
Test: checked perfetto traces
Change-Id: Ic70f440a30ea2c61e44f84098d84b0485a85905e
- When opening the emergency dialer from the bouncer, there's a brief
period where notificationPanelExpanded=false and occluded=false which
currently means canStartSystemGesture=true and
isKeyguardShowingOccluded=false, which falls through to other activity
input consumer. In this state, we can't properly finish the gesture
stream because Launcher never shows (it's behind the lockscreen)
and the recents animation never finishes.
Bug: 242704576
Test: atest NexusLauncherTests
Change-Id: I7795abe0aebefca2d42998a672abfd12f951d501
This flag allows to avoid an initial measure pass by getting the window size by the LayoutParams.
Test: Recorded a trace before and after this change and compared the doFrames
Bug: 265150323
Change-Id: I2c1e440b73437df9f328d64c98d160bed11282f3
When reading the status bar inset on devices with
multiple displays after switching the displays
the inset is not updated immediately (SystemUI
should update the height of the window first by
reacting to the display switch in it's own process).
Due to this race condition Launcher is very likely
to calculate DeviceProfile with incorrect inset
of the previous display first and update it to
the correct one only after SystemUI finished the
window update.
To avoid this adding calculation of the StatusBar
height to Launcher locally using the same utility
method that is used by SystemUI.
Bug: 264656380
Test: manual test that the statusbar height is calculated
correctly in Launcher on a device with two displays, both on
the inner and outer display and different rotations
Change-Id: Ia16ecadd8fcac29082d27ca693ab7740ce6161c4
This is needed to easily spot unwanted DeviceProfile changes in perfetto traces, as each one causes many new inflation and slows down the ui thread considerably.
Test: recorded trace with this log
Bug: 258214245
Change-Id: I805d56d4dfe1c08d7f28215c0462d01fcaece84e
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
We will hide divider when isLikelyToStartNewTask become true, but
this call sometime earlier than onRecentsAnimationStart then cause
crash because mRecentsAnimationTargets is still null.
Fix this by checking mRecentsAnimationTargets before set divider
visibility. And also add new condition to hide divider to ensure
it hidden if such case happened.
Fix: 265238266
Test: manaul
Test: pass existing tests
Change-Id: I80b1294e69a52e7ac5255cd8e55e7c5e6a3dcbcb
> Making the state animator nonNull to avoid null checks at caller
> Updating the methods names to explicitely indication animation
being started or not
Bug: 265352919
Test: Verified on device
Change-Id: I1f5b47921f831ed0b202aced10825c8e1d39a4dc
LauncherPrefs will contain Launcher's shared preference functionality.
It controls optimizations and classifications such as restorable vs
non-restorable data, bootaware vs non-bootaware data, and configurations
such as default values so the calling code doesn't need to and our code
base can have a single source of truth for items that are used in
multiple places.
The old APIs remain in place, but are deprecated and will be removed
after all Shared Preference usage has been gated by LauncherPrefs in
future CLs.
Bug: 261635315
Test: Manually tested themed icon, Workspace configuration, and app
install functionality.
Change-Id: I29fd516468bc93fda393062e95be26b6d55c816e
Bug: 188081026
Test: no op change, should compile
Test: ReorderWidgets
Change-Id: I20367974e5a4cead406e18eb66dafd4d59651b2a
Merged-In: I20367974e5a4cead406e18eb66dafd4d59651b2a