From 88319c48286f8e480ad9291f0e70395e7e0b34bc Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Mon, 21 Mar 2022 17:09:24 -0700 Subject: [PATCH 1/3] Add utility for isWallpaperSupported. Test: Manual Bug: 223549757 Change-Id: I910ad82ab12790f082525353dbdb86def93e3c04 --- src/com/android/launcher3/Utilities.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 9bc3d15da2..972a2e4fef 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -608,6 +608,10 @@ public final class Utilities { LauncherFiles.DEVICE_PREFERENCES_KEY, Context.MODE_PRIVATE); } + public static boolean isWallpaperSupported(Context context) { + return context.getSystemService(WallpaperManager.class).isWallpaperSupported(); + } + public static boolean isWallpaperAllowed(Context context) { return context.getSystemService(WallpaperManager.class).isSetWallpaperAllowed(); } From 458dcdbe1e24fcd9d1d038b49cf219e3d264740e Mon Sep 17 00:00:00 2001 From: Pat Manning Date: Mon, 28 Mar 2022 06:52:35 -0400 Subject: [PATCH 2/3] Animate overivew actions view hiding on scroll. Test: manual Fix: 221113300 Change-Id: Ie21343e280639e027f012d9c734b798f4dc4e71a --- .../quickstep/views/OverviewActionsView.java | 4 +- .../android/quickstep/views/RecentsView.java | 48 +++++++++++++------ 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java index 6b15807b00..8e5839c5b0 100644 --- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java +++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java @@ -58,7 +58,6 @@ public class OverviewActionsView extends FrameLayo HIDDEN_NON_ZERO_ROTATION, HIDDEN_NO_TASKS, HIDDEN_NO_RECENTS, - HIDDEN_FOCUSED_SCROLL, HIDDEN_SPLIT_SCREEN}) @Retention(RetentionPolicy.SOURCE) public @interface ActionsHiddenFlags { } @@ -66,8 +65,7 @@ public class OverviewActionsView extends FrameLayo public static final int HIDDEN_NON_ZERO_ROTATION = 1 << 0; public static final int HIDDEN_NO_TASKS = 1 << 1; public static final int HIDDEN_NO_RECENTS = 1 << 2; - public static final int HIDDEN_FOCUSED_SCROLL = 1 << 3; - public static final int HIDDEN_SPLIT_SCREEN = 1 << 4; + public static final int HIDDEN_SPLIT_SCREEN = 1 << 3; @IntDef(flag = true, value = { DISABLED_SCROLLING, diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 22491bcece..f9e6eecb70 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -375,6 +375,8 @@ public abstract class RecentsView 0) { @@ -1785,16 +1796,24 @@ public abstract class RecentsView Date: Wed, 30 Mar 2022 22:55:34 +0000 Subject: [PATCH 3/3] Show correct drop targets for All-apps predicted item drags. This change fixes a bug where, after a user drags and drops a predicted app from the all apps page once, dragging that item again results in the "Remove" drop target being shown rather than the "Do Not Suggest" drop target. Bug: 221057278 Test: Verified correct drop down targets were present after fix when dropping all apps prediction item on workspace multiple times in a row. Change-Id: I95940eeebbd547861fcdfbb5d02769b82446184d --- src/com/android/launcher3/Workspace.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index a7fc2f52ba..e3e8cc0233 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -2751,6 +2751,12 @@ public class Workspace extends PagedView info = ((AppInfo) info).makeWorkspaceItem(); d.dragInfo = info; } + if (info instanceof WorkspaceItemInfo + && info.container == LauncherSettings.Favorites.CONTAINER_PREDICTION) { + // Came from all apps prediction row -- make a copy + info = new WorkspaceItemInfo((WorkspaceItemInfo) info); + d.dragInfo = info; + } if (info instanceof SearchActionItemInfo) { info = ((SearchActionItemInfo) info).createWorkspaceItem( mLauncher.getModel());