diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java index d69769a8a4..f0d28dfd05 100644 --- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java +++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java @@ -71,13 +71,6 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView mDown.set(ev.getX(), ev.getY()); + case ACTION_DOWN -> { + mDown.set(ev.getX(), ev.getY()); + mHasPassedTouchSlop = false; + } case ACTION_MOVE -> { - float displacementY = ev.getY() - mDown.y; - if (displacementY > mTouchSlop) { - setActive(ev); - ev.setAction(ACTION_DOWN); - dispatchTouchEvent(ev); + if (!mHasPassedTouchSlop) { + float displacementY = ev.getY() - mDown.y; + if (Math.abs(displacementY) > mTouchSlop) { + mHasPassedTouchSlop = true; + if (displacementY > 0) { + setActive(ev); + ev.setAction(ACTION_DOWN); + dispatchTouchEvent(ev); + } + } } } } diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index 42589ced5d..53660b5040 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -581,6 +581,7 @@ public class TaskView extends FrameLayout implements Reusable { mIconView, STAGE_POSITION_UNDEFINED); mSnapshotView.bind(task); setOrientationState(orientedState); + mDigitalWellBeingToast.initialize(mTask); } /** @@ -984,10 +985,7 @@ public class TaskView extends FrameLayout implements Reusable { } if (needsUpdate(changes, FLAG_UPDATE_ICON)) { mIconLoadRequest = iconCache.updateIconInBackground(mTask, - (task) -> { - setIcon(mIconView, task.icon); - mDigitalWellBeingToast.initialize(mTask); - }); + (task) -> setIcon(mIconView, task.icon)); } } else { if (needsUpdate(changes, FLAG_UPDATE_THUMBNAIL)) { diff --git a/res/drawable/ic_note_taking_widget_category.xml b/res/drawable/ic_note_taking_widget_category.xml new file mode 100644 index 0000000000..2b5915736f --- /dev/null +++ b/res/drawable/ic_note_taking_widget_category.xml @@ -0,0 +1,33 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index b54d4f795e..c2eb3735af 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -106,6 +106,9 @@ Conversations + + Note-taking + Useful info at your fingertips diff --git a/res/xml/widget_sections.xml b/res/xml/widget_sections.xml index d755de6f8a..6165bf7051 100644 --- a/res/xml/widget_sections.xml +++ b/res/xml/widget_sections.xml @@ -22,4 +22,10 @@ launcher:sectionTitle="@string/widget_category_conversations"> +
+ +
\ No newline at end of file diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index cdebe440a1..492bcf5470 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -35,6 +35,12 @@ import java.util.function.ToIntFunction; /** * Defines a set of flags used to control various launcher behaviors. * + * Please only add flags to your assigned block to prevent merge conflicts. If you do not have + * a block, please update the current empty block and add a new empty block below to prevent + * merge conflicts with the previous block. + * List of blocks can be found: + * here + * *

All the flags should be defined here with appropriate default values. */ public final class FeatureFlags { @@ -74,9 +80,6 @@ public final class FeatureFlags { * Declare a new ToggleableFlag below. Give it a unique key (e.g. "QSB_ON_FIRST_SCREEN"), * and set a default value for the flag. This will be the default value on Debug builds. *

- * Please only add flags to your assigned block to prevent merge conflicts. If you do not have - * a block, please update the current empty block and add a new empty block below to prevent - * merge conflicts with the previous block. */ // TODO(Block 1): Clean up flags public static final BooleanFlag ENABLE_ONE_SEARCH_MOTION = getReleaseFlag(270394223, @@ -179,7 +182,7 @@ public final class FeatureFlags { // TODO(Block 10): Clean up flags public static final BooleanFlag ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION = getDebugFlag(270614790, "ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION", DISABLED, - "Enables predictive back aniamtion from all apps and widgets to home"); + "Enables predictive back animation from all apps and widgets to home"); // TODO(Block 11): Clean up flags public static final BooleanFlag ENABLE_TWO_PANEL_HOME = getDebugFlag(270392643, @@ -312,6 +315,10 @@ public final class FeatureFlags { "ENABLE_GRID_ONLY_OVERVIEW", DISABLED, "Enable a grid-only overview without a focused task."); + public static final BooleanFlag ENABLE_CURSOR_HOVER_STATES = getDebugFlag(243191650, + "ENABLE_CURSOR_HOVER_STATES", DISABLED, + "Enables cursor hover states for certain elements."); + // TODO(Block 24): Clean up flags public static final BooleanFlag ENABLE_NEW_MIGRATION_LOGIC = getDebugFlag(270393455, "ENABLE_NEW_MIGRATION_LOGIC", ENABLED, @@ -398,10 +405,6 @@ public final class FeatureFlags { // TODO(Block 31): Empty block - public static final BooleanFlag ENABLE_CURSOR_HOVER_STATES = getDebugFlag(243191650, - "ENABLE_CURSOR_HOVER_STATES", DISABLED, - "Enables cursor hover states for certain elements."); - public static class BooleanFlag { private final boolean mCurrentValue; diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java index 86f4beb6c4..48239ae06d 100644 --- a/src/com/android/launcher3/folder/FolderIcon.java +++ b/src/com/android/launcher3/folder/FolderIcon.java @@ -205,7 +205,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel lp.topMargin = grid.iconSizePx + grid.iconDrawablePaddingPx; icon.setTag(folderInfo); - icon.setOnClickListener(ItemClickHandler.INSTANCE); + icon.setOnClickListener(activity.getItemOnClickListener()); icon.mInfo = folderInfo; icon.mActivity = activity; icon.mDotRenderer = grid.mDotRendererWorkSpace; diff --git a/src/com/android/launcher3/folder/FolderPagedView.java b/src/com/android/launcher3/folder/FolderPagedView.java index d43731b998..6ff8ece5d7 100644 --- a/src/com/android/launcher3/folder/FolderPagedView.java +++ b/src/com/android/launcher3/folder/FolderPagedView.java @@ -216,7 +216,7 @@ public class FolderPagedView extends PagedView implements Cli final BubbleTextView textView = mViewCache.getView( R.layout.folder_application, getContext(), null); textView.applyFromWorkspaceItem(item); - textView.setOnClickListener(ItemClickHandler.INSTANCE); + textView.setOnClickListener(mFolder.mActivityContext.getItemOnClickListener()); textView.setOnLongClickListener(mFolder); textView.setOnFocusChangeListener(mFocusIndicatorHelper); CellLayoutLayoutParams lp = (CellLayoutLayoutParams) textView.getLayoutParams(); diff --git a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java index 130ee3a70c..1c88c4a466 100644 --- a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java +++ b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java @@ -86,7 +86,7 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView setWillNotDraw(false); super.updateAppWidget(null); - setOnClickListener(ItemClickHandler.INSTANCE); + setOnClickListener(mLauncher.getItemOnClickListener()); if (info.pendingItemInfo == null) { info.pendingItemInfo = new PackageItemInfo(info.providerName.getPackageName(),