Merge "OverviewActions: Creating parent view to house RecentsView and Overview Actions." into ub-launcher3-master
diff --git a/Android.bp b/Android.bp
index cb695df..e132854 100644
--- a/Android.bp
+++ b/Android.bp
@@ -47,3 +47,14 @@
},
static_libs: ["libprotobuf-java-lite"],
}
+
+java_library {
+ name: "LauncherPluginLib",
+
+ static_libs: ["PluginCoreLib"],
+
+ srcs: ["src_plugins/**/*.java"],
+
+ sdk_version: "current",
+ min_sdk_version: "28",
+}
diff --git a/Android.mk b/Android.mk
index c066a12..9cfcf17 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,24 +17,6 @@
LOCAL_PATH := $(call my-dir)
#
-# Build rule for plugin lib (needed to write a plugin).
-#
-include $(CLEAR_VARS)
-LOCAL_USE_AAPT2 := true
-LOCAL_AAPT2_ONLY := true
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_JAVA_LIBRARIES:= PluginCoreLib
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src_plugins)
-
-LOCAL_SDK_VERSION := current
-LOCAL_MIN_SDK_VERSION := 28
-LOCAL_MODULE := LauncherPluginLib
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-#
# Build rule for Launcher3 dependencies lib.
#
include $(CLEAR_VARS)
diff --git a/protos/launcher_log.proto b/protos/launcher_log.proto
index ec1d55b..d08d851 100644
--- a/protos/launcher_log.proto
+++ b/protos/launcher_log.proto
@@ -151,6 +151,10 @@
DISMISS_PREDICTION = 21;
HYBRID_HOTSEAT_ACCEPTED = 22;
HYBRID_HOTSEAT_CANCELED = 23;
+ OVERVIEW_ACTIONS_SHARE_BUTTON = 24;
+ OVERVIEW_ACTIONS_SCREENSHOT_BUTTON = 25;
+ OVERVIEW_ACTIONS_SELECT_BUTTON = 26;
+ SELECT_MODE_CLOSE_BUTTON = 27;
}
enum TipType {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
index b71fede..5a9c2fe 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
@@ -70,9 +70,6 @@
// if the aspect ratio of the target is smaller than the aspect ratio of the source rect. In
// app window coordinates.
private final RectF mSourceWindowClipInsets = new RectF();
- // The insets to be used for clipping the app window. For live tile, we don't transform the clip
- // relative to the target rect.
- private final RectF mSourceWindowClipInsetsForLiveTile = new RectF();
// The clip rect in source app window coordinates. The app window surface will only be drawn
// within these bounds. This clip rect starts at the full mSourceStackBounds, and insets by
// mSourceWindowClipInsets as the transform progress goes to 1.
@@ -149,7 +146,6 @@
Math.max(scaledTargetRect.top, 0),
Math.max(mSourceStackBounds.width() - scaledTargetRect.right, 0),
Math.max(mSourceStackBounds.height() - scaledTargetRect.bottom, 0));
- mSourceWindowClipInsetsForLiveTile.set(mSourceWindowClipInsets);
mSourceRect.set(scaledTargetRect);
}
@@ -252,14 +248,12 @@
private void updateClipRect(TransformParams params) {
// Don't clip past progress > 1.
float progress = Math.min(1, params.mProgress);
- final RectF sourceWindowClipInsets = params.mForLiveTile
- ? mSourceWindowClipInsetsForLiveTile : mSourceWindowClipInsets;
- mCurrentClipRectF.left = sourceWindowClipInsets.left * progress;
- mCurrentClipRectF.top = sourceWindowClipInsets.top * progress;
+ mCurrentClipRectF.left = mSourceWindowClipInsets.left * progress;
+ mCurrentClipRectF.top = mSourceWindowClipInsets.top * progress;
mCurrentClipRectF.right =
- mSourceStackBounds.width() - (sourceWindowClipInsets.right * progress);
+ mSourceStackBounds.width() - (mSourceWindowClipInsets.right * progress);
mCurrentClipRectF.bottom =
- mSourceStackBounds.height() - (sourceWindowClipInsets.bottom * progress);
+ mSourceStackBounds.height() - (mSourceWindowClipInsets.bottom * progress);
}
public RectF getCurrentRectWithInsets() {
@@ -400,7 +394,6 @@
private float mOffsetScale;
private @Nullable RectF mCurrentRect;
private float mTargetAlpha;
- private boolean mForLiveTile;
private float mCornerRadius;
private boolean mLauncherOnTop;
private RemoteAnimationTargets mTargetSet;
@@ -412,7 +405,6 @@
mOffsetScale = 1;
mCurrentRect = null;
mTargetAlpha = 1;
- mForLiveTile = false;
mCornerRadius = -1;
mLauncherOnTop = false;
}
@@ -477,16 +469,6 @@
}
/**
- * Specifies whether we should clip the source window based on
- * {@link AppWindowAnimationHelper#mSourceWindowClipInsetsForLiveTile} rather than
- * {@link AppWindowAnimationHelper#mSourceWindowClipInsets} as {@link #mProgress} goes to 1.
- */
- public TransformParams setForLiveTile(boolean forLiveTile) {
- mForLiveTile = forLiveTile;
- return this;
- }
-
- /**
* If true, sets the crop = null and layer = Integer.MAX_VALUE for targets that don't match
* {@link #mTargetSet}.targetMode. (Currently only does this when live tiles are enabled.)
*/
@@ -539,10 +521,6 @@
return mTargetAlpha;
}
- public boolean isForLiveTile() {
- return mForLiveTile;
- }
-
public float getCornerRadius() {
return mCornerRadius;
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
index d705cc0..3e106aa 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -201,8 +201,7 @@
if (tv.isRunningTask()) {
mTransformParams.setProgress(1 - progress)
.setCurrentRect(null)
- .setSyncTransactionApplier(mSyncTransactionApplier)
- .setForLiveTile(true);
+ .setSyncTransactionApplier(mSyncTransactionApplier);
mAppWindowAnimationHelper.applyTransform(mTransformParams);
} else {
redrawLiveTile(true);
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index ddb88dc..e33d89f 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -346,7 +346,7 @@
}
mInfo.title = newTitle;
- mInfo.setOption(FLAG_MANUAL_FOLDER_NAME, mFolderName.isEnteredCompose(),
+ mInfo.setOption(FLAG_MANUAL_FOLDER_NAME, getAcceptedSuggestionIndex() < 0,
mLauncher.getModelWriter());
mFolderIcon.onTitleChanged(newTitle);
mLauncher.getModelWriter().updateItemInDatabase(mInfo);
@@ -437,11 +437,11 @@
}
mItemsInvalidated = true;
mInfo.addListener(this);
+ mPreviousLabel = mInfo.title.toString();
+ mIsPreviousLabelSuggested = !mInfo.hasOption(FLAG_MANUAL_FOLDER_NAME);
if (!isEmpty(mInfo.title)) {
mFolderName.setText(mInfo.title);
- mPreviousLabel = mInfo.title.toString();
- mIsPreviousLabelSuggested = !mInfo.hasOption(FLAG_MANUAL_FOLDER_NAME);
mFolderName.setHint(null);
} else {
mFolderName.setText("");
diff --git a/src/com/android/launcher3/folder/FolderNameEditText.java b/src/com/android/launcher3/folder/FolderNameEditText.java
index 7e11b18..edf2c70 100644
--- a/src/com/android/launcher3/folder/FolderNameEditText.java
+++ b/src/com/android/launcher3/folder/FolderNameEditText.java
@@ -102,13 +102,6 @@
mEnteredCompose = value;
}
- protected boolean isEnteredCompose() {
- if (DEBUG) {
- Log.d(TAG, "isEnteredCompose " + mEnteredCompose);
- }
- return mEnteredCompose;
- }
-
private class FolderNameEditTextInputConnection extends InputConnectionWrapper {
FolderNameEditTextInputConnection(InputConnection target, boolean mutable) {