Commit Graph

12861 Commits

Author SHA1 Message Date
Jon Miranda
f6365d5b85 Add debug logs for bad launcher state.
Bug: 223498680
Bug: 221658803
Bug: 223499269

Test: manual
Change-Id: I138a7ab031269009fa8ca492cd0bd48085aa4e68
(cherry picked from commit 7ebe209c21)
Merged-In: I138a7ab031269009fa8ca492cd0bd48085aa4e68
2022-03-11 03:35:17 +00:00
Brian Isganitis
8aa4b05d22 Remove popup container drag listener on close complete.
Bug: 217162588
Test: Verified removal once drag is finished. Verified working on secondary display launcher.
Change-Id: I16515518c6d488b74450456306abbfff646ac11b
Merged-In: I16515518c6d488b74450456306abbfff646ac11b
2022-02-18 21:18:33 +00:00
Jon Miranda
35d294387c Init FloatingIconView properties before fetching drawable.
& Make sure properties are reset when recycled.

This fixes the bug that causes BubbleTextView drawable not to get set.

Bug: 207389002
Test: locally disable loading AdaptiveIcons, ensure BubbleTextView
      drawable always gets drawn for closing animation

Change-Id: Ifdbf3e733e27918c57a5e9b23e5a11b65f8f338c
(cherry picked from commit b2670d2051)
Merged-In: Ifdbf3e733e27918c57a5e9b23e5a11b65f8f338c
2022-02-16 23:23:44 +00:00
TreeHugger Robot
9f0d54ebe3 Merge "Fix taskbar icon dragging issues" into sc-v2-dev 2022-02-01 19:53:13 +00:00
Schneider Victor-tulias
a8dae26d39 Fix taskbar icon dragging issues
- Fixed icons disappearing when initiating dragging
- Fixed incorrect icon location when initiating dragging after rotating the screen to an orientation other than what launcher started in

Fixes: 215418478
Fixes: 214025075
Fixes: 210460544
Test: dragged icons from the workspace and taskbar
Change-Id: I848138af28802f7d806708c77c25b8de307c70d8
(cherry picked from commit 312b68fde4)
Merged-In: I848138af28802f7d806708c77c25b8de307c70d8
2022-02-01 18:27:59 +00:00
Andy Wickham
5f0a5eb877 Utilities.trim never returns null.
This fixes a crash loop I was seeing on my device and also
preemptively fixes similar NullPointerExceptions.

Bug: 213931730
Test: Manually verified crash loop stopped with this change.
Change-Id: I8d2fc8475d42ac60b7fdc9219421a8c9733c7b9f
(cherry picked from commit 56be73be80)
2022-01-28 00:56:08 +00:00
Tony Wickham
e064f51642 Merge "Update hotseat alpha in TaskbarLauncherStateController#init()" into sc-v2-dev 2021-12-21 00:30:12 +00:00
Tony Wickham
bf07660f9e Update hotseat alpha in TaskbarLauncherStateController#init()
Technically the consumer should do that already, but the consumer isn't called if the value isn't changed (in this case, it's going from 1 to 1). So explicitly call the consumer once in init().

Test: Open an app, toggle dark theme from quick settings, go home and ensure hotseat isn't visible during the transition
Fixes: 211002647
Change-Id: I5a9680282b3982d9b6f982833cd671b224767518
2021-12-16 18:29:41 +00:00
TreeHugger Robot
8d25a0a363 Merge "Show Digital Wellbeing Banners for split tasks" into sc-v2-dev 2021-12-16 11:13:10 +00:00
Vinit Nayak
ebf2cdd0f1 Show Digital Wellbeing Banners for split tasks
Fixes: 199936292
Change-Id: I38743d58f53a65ef717b1babc21ad1df2dc840a4
2021-12-15 22:19:02 -08:00
Winson Chung
2ecf688de6 Merge "Wait for the Launcher activity to bind to TIS before animating" into sc-v2-dev 2021-12-15 19:44:26 +00:00
Vinit Nayak
8581dfc218 Wait for the Launcher activity to bind to TIS before animating
- Mainly a test issue where we destroy the activity and immediately
  enter overview without preloading launcher.  In this case, the task
  bar does not animate due to the delayed cycled of activity create
  -> bind service -> service connected -> taskbar ui controller init.
  As a result, the bar can occlude content from Launcher preventing
  the test from finding the overview actions.

  Instead, in cases where we need to animate with launcher, we wait
  for Launcher to be created (generally already the case) and the
  service has bound before proceeding.

Bug: 189807374
Bug: 204891006
Test: atest NexusLauncherTests:com.android.quickstep.StartLauncherViaGestureTests
Change-Id: I2cfccae67ac0e5a591639c6c99df032451dae16d
2021-12-15 00:53:54 +00:00
TreeHugger Robot
ed6cbbc9a6 Merge "Set default value for rank field in launcher logs to ItemInfo.rank." into sc-v2-dev 2021-12-13 18:48:09 +00:00
TreeHugger Robot
953873dd18 Merge "DeviceProfile.overviewRowSpacing should exclude extra top margin on grid tasks" into sc-v2-dev 2021-12-11 01:12:57 +00:00
TreeHugger Robot
5599b02141 Merge "Allow restore across form factors" into sc-v2-dev 2021-12-11 00:11:56 +00:00
Alex Chau
4c98374d99 DeviceProfile.overviewRowSpacing should exclude extra top margin on grid tasks
Bug: 207350366
Bug: 210158657
Test: manual
Change-Id: I28116407c4267259a75fd39637104cea9db73fe3
2021-12-10 23:29:08 +00:00
Jon Miranda
b788f9f7f7 Merge "Display in-memory icon for app close while AdaptiveIcon loads." into sc-v2-dev 2021-12-10 23:20:42 +00:00
Alex Chau
ab26c62c4a Allow restore across form factors
- Removed deviceTypeCompatible check and allow restore across for mfactors
- In AOSP default device_profile, mark 3x3, 4x4, and 5x5 as phone only. On tablets they'll reflow to 6x5.

Bug: 198575341
Bug: 210129187
Test: Only 3x3, 4x4 and 5x5 are enabled on phone
Test: Only 6x5 is enabled on tablet
Test: Phone backup of 4x4 get restored and reflow to 6x5 on tablet
Change-Id: I36a641d47fcee86ace0fea3d9194d61d12517f13
2021-12-10 22:00:49 +00:00
Jon Miranda
0c2f0faef1 Display in-memory icon for app close while AdaptiveIcon loads.
- We already display the BubbleTextView icon during app close
  since we need the shadows to ensure a clean handoff.
- Previously, we waited until the icon and the AdaptiveIcon were
  both loaded to show the FloatingIconView.
- This change immediately shows the BubbleTextView icon so that
  we can have something displayed in the cases where AdaptiveIcon
  is slow to load (ie. immediately after killing/restarting launcher).

Currently there are cases where we defer some BubbleTextView drawing to
ClipIconView. We can refactor in master so that ClipIconView is only used
when drawable is an AdaptiveIcon.

Bug: 207389002
Test: manual
Change-Id: Ie54642fef4258862a155ab0aba6e49cea9c9ead0
2021-12-10 13:25:39 -08:00
Jon Miranda
7ac2a71b94 Merge "Clear all DragView in onSaveInstanceState" into sc-v2-dev 2021-12-10 18:36:15 +00:00
Vinit Nayak
2a93bc5b30 Add split support for 3P launcher
* Copied logic mostly from
Base/RecentsViewStateController
* There's one KI crash specific to 3P
(b/209694087)
* Swipe to home animation is TODO, but
then again it also seems incorrect for
full-screen app. 3P has many cosmetic issues
throughout.

Bug: 195607777
Test: Tested w/ Nova launcher with grid
and non-grid, able to invoke split screen with
same animations as 1P launcher

Change-Id: I35a1bc92a51caccac4214289e614000cd47bb503
2021-12-09 12:52:04 -08:00
Jon Miranda
14d6771aae Clear all DragView in onSaveInstanceState
Multiple users reports view getting stuck on screen. This CL
clears all DragView when user leaves launcher.

Root cause still undetermined, but happens enough that it warrants
a temp fix.

Bug: 162636845
Test: manual
Change-Id: I532b5274a1308c53f67c23c5c8ca07f2b7f9802c
2021-12-08 17:47:33 -08:00
TreeHugger Robot
b1ae1ca124 Merge "Add launcher grid spec for tablet" into sc-v2-dev 2021-12-08 22:49:00 +00:00
Alex Chau
1c883d861e Add launcher grid spec for tablet
- Introduced device_category to allow grids to be only enabled for certain device types. By default grids are enabled for all device types, so old OEM device_profiles aren't affected
  - Removed device_profiles_split.xml as a result and merged with device_profiles.xml
- Added deviceType in InvariantDeviceProfile to replace isSplitDisplay and centralize the logic
- Only has 6x5 grid with new default layout that works better for tablets

Bug: 198575341
Test: manual
Change-Id: I03f6727ce837ffeee6321b6d7c53942338d0cf30
2021-12-08 18:22:34 +00:00
Tony Wickham
b5a051ca0b Merge changes I6cf84ec7,Iea599651,If3238286 into sc-v2-dev
* changes:
  Improve quick switch from home to taskbar
  Cleanup some taskbar/hotseat handoff issues
  Fix taskbar stash misalignment when going from app to overview
2021-12-08 17:42:54 +00:00
Alex Chau
86ef5e924a Handle split select rotation
- Update floatingTaskView, apply splitsSelectTranslation and splitPrimaryScorllOffest when rotating while in split select
- Moved getSplitSelectTranslation to RecentsView
- When in portrait, treat STAGE_POSITION_BOTTOM_OR_RIGHT as STAGE_POSITION_TOP_OR_LEFT in split translation calculation
- Apply splitsSelectTranslation for portrait grid too

Fix: 201721153
Test: manual
Change-Id: I768a3b15de4d434674058b274c368798f5852917
2021-12-08 11:35:02 +00:00
TreeHugger Robot
57b9c472dc Merge "[DO NOT MERGE] Remove one search flag and code from sc-v2." into sc-v2-dev 2021-12-08 06:57:28 +00:00
Brian Isganitis
d3ebc4c692 Merge "Adding support for logging wallpaper container info." into sc-v2-dev 2021-12-08 05:48:30 +00:00
Brian Isganitis
79efba935f Adding support for logging wallpaper container info.
Test: https://paste.googleplex.com/5350571797118976 shows logging carousel size and index of wallpaper tapped. If the wallpaper is a live wallpaper, we also log its application info.
Bug: 188222480
Change-Id: I6dd7ac20af7afd675d8a886d5b838263680f773e
Merged-In: I6dd7ac20af7afd675d8a886d5b838263680f773e
2021-12-08 00:22:59 +00:00
Tony Wickham
24675d36b7 Improve quick switch from home to taskbar
- Add LauncherState#isTaskbarAlignedWithHotseat() which defaults to !isTaskbarStashed(), but is always false for quick switch from home
- Replaced FLAG_TRANSITION_STATE_START_STASHED and FLAG_TRANSITION_STATE_COMMITTED_STASHED with FLAG_STATE_TRANSITION_RUNNING and a reference to mLauncherState. STATE_START is equivalent to TRANSITION_RUNNING changing to true, and STATE_COMMITTED is equivalent to TRANSITION_RUNNING changing to false. Then can get details from the state such as whether taskbar is stashed and icon alignment from mLauncherState

Test: quick switch from home, both with taskbar stashed in apps and not
Fixes: 194728611
Bug: 204657916
Change-Id: I6cf84ec73a4036e14cc7268667c6f62100884c27
2021-12-07 13:13:48 -08:00
Tony Wickham
779879ce3d Merge "Remove LauncherState.TASKBAR visible element" into sc-v2-dev 2021-12-07 20:42:55 +00:00
Alex Chau
992db75dae Use percentage scaling for overview thumbnail size
- Limit overview to screen ratio to be at max 70%
- Tuned row spacing and page spacing
- Added 2 more test activities to testOverviewForTablet to avoid dismissing tasks at end of grid, as more grid tasks are now shown

Bug: 207350366
Test: manual
Change-Id: Id04871464bdb3ef2d6b046977b0ffd9bd51bc230
Merged-In: Id04871464bdb3ef2d6b046977b0ffd9bd51bc230
2021-12-07 14:50:40 +00:00
Tony Wickham
7af54403a3 Remove LauncherState.TASKBAR visible element
It's no longer used, so removing to cleanup code and reduce confusion

Test: no functional change
Fixes: 209512651
Change-Id: Ibd671bde7190df976b5365331731a55a9abdbb35
2021-12-06 15:59:39 -08:00
Becky Qiu
d0a9f1502b [DO NOT MERGE] Remove one search flag and code from sc-v2.
Bug: 209501163
Test: manual
Change-Id: Iee1c8276a1f81aa0f54e8a342cfdd3f01d7ab1b7
2021-12-06 15:22:04 -08:00
Jon Miranda
52ee4ec4aa Merge "Play return to icon animation if user swipes back to All Apps." into sc-v2-dev 2021-12-06 18:17:52 +00:00
Alex Chau
5656154f1a Merge "Add back screenshot button to Launcher3" into sc-v2-dev 2021-12-06 17:37:42 +00:00
TreeHugger Robot
ad890ac5af Merge "Use getMeasuredWidth instead of getWidth in setSplitIconParams" into sc-v2-dev 2021-12-03 20:23:58 +00:00
Alex Chau
4bdf8c1754 Use getMeasuredWidth instead of getWidth in setSplitIconParams
Fix: 208647202
Test: Enter overview with app pairs, rotate and rotate back, check the task icon
Change-Id: I14914258a2508cf3f399312f4c88574b27a5e9fa
2021-12-03 18:28:38 +00:00
Alex Chau
dc73072797 Constraint Snackbar's width to 504dp
Fix: 209005185
Test: manual
Change-Id: I512ddb575a9fced4bf2608806aef875fe34304e6
2021-12-03 16:20:42 +00:00
Alex Chau
1bf0fe1b70 Add back screenshot button to Launcher3
- 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
2021-12-03 12:32:29 +00:00
Alex Chau
683b4cd824 Merge "Destroy activity/view references to avoid memory leak" into sc-v2-dev 2021-12-03 12:30:49 +00:00
Vinit Nayak
573fca80f6 Destroy activity/view references to avoid memory leak
Bug: 204891006
Change-Id: If60ac1716c30ebe68fb6e7457d71f542d3075422
2021-12-02 16:05:52 -08:00
TreeHugger Robot
7f54d5cde4 Merge "Add icons for staged split" into sc-v2-dev 2021-12-02 23:00:48 +00:00
Alex Chau
b31176c83b Merge "Fix switch access for overview grid" into sc-v2-dev 2021-12-02 22:32:01 +00:00
Vinit Nayak
455197bf41 Add icons for staged split
Fixes: 208649953
Change-Id: I8b7bb3a650e836608ebe6aa50631026f5f6a7c63
2021-12-01 14:58:53 -08:00
Brian Isganitis
be388b8933 Merge "Make action optional for snackbar." into sc-v2-dev 2021-12-01 00:18:40 +00:00
Jonathan Miranda
199644c397 Merge "Fix NPE in FloatingIconView" into sc-v2-dev 2021-11-30 18:43:29 +00:00
TreeHugger Robot
96f34af124 Merge "Fling to close tasks in the GestureNav can be too small." into sc-v2-dev 2021-11-30 18:34:09 +00:00
Thiru Ramasamy
24fbda5448 Set default value for rank field in launcher logs to ItemInfo.rank.
Bug: 188222480
Test: wwdebug & wwlogcat
Change-Id: I16786eb2e6f1d4ce44dbda5eff27b1cd7f50ee8e
2021-11-29 16:14:02 -08:00
TreeHugger Robot
c5f18aa980 Merge "Resets taskSplitTranslation of inactive orientation" into sc-v2-dev 2021-11-26 18:23:43 +00:00