summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorKevin F. Haggerty <haggertk@lineageos.org>2020-06-06 10:04:42 -0600
committerKevin F. Haggerty <haggertk@lineageos.org>2020-06-06 10:05:30 -0600
commit0c062179a89e047d778925412632473005a2ec43 (patch)
tree639916800e76ccf6b5e9b371d3a1c0cb083486d0 /quickstep
parentb0838b261a6fb447fe9c4cf2513236a0736be209 (diff)
parent09bdbebdd2c93123a5d418de56053cc1c279afee (diff)
downloadandroid_packages_apps_Trebuchet-lineage-17.1.tar.gz
android_packages_apps_Trebuchet-lineage-17.1.tar.bz2
android_packages_apps_Trebuchet-lineage-17.1.zip
Merge tag 'android-10.0.0_r37' into staging/lineage-17.1_merge-android-10.0.0_r37lineage-17.1
Android 10.0.0 Release 37 (QQ3A.200605.001) * tag 'android-10.0.0_r37': [DO NOT MERGE] Enable APP_SEARCH_IMPROVEMENTS flag. Ensure current animation is cancelled before building new folder animation. Fixes ag/10573640 on qt-future-dev branch. [DO NOT MERGE] Adds basic smart-folder logging. [DO NOT MERGE] Support blacklisting live wallpapers from showing sysui scrims Import translations. DO NOT MERGE Revert "[DO NOT MERGE] Turn off FOLDER_NAME_SUGGEST feature flag" [DO NOT MERGE] Initiailize APP_SEARCH_IMRPOVEMENT flag outside DEBUG builds. [DO NOT MERGE] Adds fling gesture suppression to Launcher Dismisses system overlays for Home intent. [DO NOT MERGE] Fix some visual jumps when swiping home [DO NOT MERGE] Turn off FOLDER_NAME_SUGGEST feature flag Bug: 150788630 [DO NOT MERGE] Prevent hotseat touch hijack Change-Id: I2316620bda33d83d668c8727e728af09db3e3e4c
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java7
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java17
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/RecentsRootView.java3
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java13
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java4
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java8
-rw-r--r--quickstep/src/com/android/quickstep/OverviewComponentObserver.java5
7 files changed, 46 insertions, 11 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
index 5cce53ebf..e5d2b411a 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
@@ -386,6 +386,10 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten
// rounding at the end of the animation.
float startRadius = mClipAnimationHelper.getCurrentCornerRadius();
float endRadius = startRect.width() / 6f;
+
+ float startTransformProgress = mTransformParams.getProgress();
+ float endTransformProgress = 1;
+
// We want the window alpha to be 0 once this threshold is met, so that the
// FolderIconView can be seen morphing into the icon shape.
final float windowAlphaThreshold = isFloatingIconView ? 1f - SHAPE_PROGRESS_DURATION : 1f;
@@ -409,7 +413,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten
public void onUpdate(RectF currentRect, float progress) {
homeAnim.setPlayFraction(progress);
- mTransformParams.setProgress(progress)
+ mTransformParams.setProgress(
+ Utilities.mapRange(progress, startTransformProgress, endTransformProgress))
.setCurrentRectAndTargetAlpha(currentRect, getWindowAlpha(progress));
if (isFloatingIconView) {
mTransformParams.setCornerRadius(endRadius * progress + startRadius
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
index f32182600..2fa789fd6 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
@@ -563,9 +563,13 @@ public class TouchInteractionService extends Service implements
// not interrupt it. QuickSwitch assumes that interruption can only happen if the
// next gesture is also quick switch.
mUncheckedConsumer =
- new AssistantTouchConsumer(this, mISystemUiProxy,
+ new AssistantTouchConsumer(
+ this,
+ mISystemUiProxy,
mOverviewComponentObserver.getActivityControlHelper(),
- InputConsumer.NO_OP, mInputMonitorCompat);
+ InputConsumer.NO_OP,
+ mInputMonitorCompat,
+ mOverviewComponentObserver.assistantGestureIsConstrained());
} else {
mUncheckedConsumer = InputConsumer.NO_OP;
}
@@ -612,8 +616,13 @@ public class TouchInteractionService extends Service implements
final ActivityControlHelper activityControl =
mOverviewComponentObserver.getActivityControlHelper();
if (canTriggerAssistantAction(event)) {
- base = new AssistantTouchConsumer(this, mISystemUiProxy, activityControl, base,
- mInputMonitorCompat);
+ base = new AssistantTouchConsumer(
+ this,
+ mISystemUiProxy,
+ activityControl,
+ base,
+ mInputMonitorCompat,
+ mOverviewComponentObserver.assistantGestureIsConstrained());
}
if ((mSystemUiStateFlags & SYSUI_STATE_SCREEN_PINNING) != 0) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/RecentsRootView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/RecentsRootView.java
index 182072957..2b369e7bf 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/RecentsRootView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/RecentsRootView.java
@@ -80,7 +80,8 @@ public class RecentsRootView extends BaseDragLayer<RecentsActivity> {
if (!insets.equals(mInsets)) {
super.setInsets(insets);
}
- setBackground(insets.top == 0 ? null
+ setBackground(insets.top == 0 || !mAllowSysuiScrims
+ ? null
: Themes.getAttrDrawable(getContext(), R.attr.workspaceStatusBarScrim));
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java
index 346969e59..d4cdaf040 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java
@@ -91,14 +91,16 @@ public class AssistantTouchConsumer extends DelegateInputConsumer {
private final ISystemUiProxy mSysUiProxy;
private final Context mContext;
private final GestureDetector mGestureDetector;
+ private final boolean mIsAssistGestureConstrained;
public AssistantTouchConsumer(Context context, ISystemUiProxy systemUiProxy,
ActivityControlHelper activityControlHelper, InputConsumer delegate,
- InputMonitorCompat inputMonitor) {
+ InputMonitorCompat inputMonitor, boolean isAssistGestureConstrained) {
super(delegate, inputMonitor);
final Resources res = context.getResources();
mContext = context;
mSysUiProxy = systemUiProxy;
+ mIsAssistGestureConstrained = isAssistGestureConstrained;
mDragDistThreshold = res.getDimension(R.dimen.gestures_assistant_drag_threshold);
mFlingDistThreshold = res.getDimension(R.dimen.gestures_assistant_fling_threshold);
mTimeThreshold = res.getInteger(R.integer.assistant_gesture_min_time_threshold);
@@ -273,10 +275,11 @@ public class AssistantTouchConsumer extends DelegateInputConsumer {
private class AssistantGestureListener extends SimpleOnGestureListener {
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
- if (isValidAssistantGestureAngle(velocityX, -velocityY)
- && mDistance >= mFlingDistThreshold
- && !mLaunchedAssistant
- && mState != STATE_DELEGATE_ACTIVE) {
+ if (!mIsAssistGestureConstrained
+ && isValidAssistantGestureAngle(velocityX, -velocityY)
+ && mDistance >= mFlingDistThreshold
+ && !mLaunchedAssistant
+ && mState != STATE_DELEGATE_ACTIVE) {
mLastProgress = 1;
try {
mSysUiProxy.onAssistantGestureCompletion(
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
index a12ae7a45..68007da40 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
@@ -402,6 +402,10 @@ public class ClipAnimationHelper {
return this;
}
+ public float getProgress() {
+ return progress;
+ }
+
public TransformParams setCornerRadius(float cornerRadius) {
this.cornerRadius = cornerRadius;
return this;
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index c02df9386..0790cf6b0 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -28,6 +28,7 @@ import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN;
+import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
@@ -58,6 +59,7 @@ import com.android.quickstep.SysUINavigationMode.Mode;
import com.android.quickstep.SysUINavigationMode.NavigationModeChangeListener;
import com.android.quickstep.util.RemoteFadeOutAnimationListener;
import com.android.systemui.shared.system.ActivityCompat;
+import com.android.systemui.shared.system.ActivityManagerWrapper;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
@@ -251,4 +253,10 @@ public class UiFactory extends RecentsUiFactory {
Person[] persons = si.getPersons();
return persons == null ? Utilities.EMPTY_PERSON_ARRAY : persons;
}
+
+ /** Closes system windows. */
+ public static void closeSystemWindows() {
+ ActivityManagerWrapper.getInstance()
+ .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
index 88a4eb6d1..93a6127ed 100644
--- a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
+++ b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
@@ -22,6 +22,7 @@ import static android.content.Intent.ACTION_PACKAGE_REMOVED;
import static com.android.launcher3.util.PackageManagerHelper.getPackageFilter;
import static com.android.systemui.shared.system.PackageManagerWrapper.ACTION_PREFERRED_ACTIVITY_CHANGED;
+import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ASSIST_GESTURE_CONSTRAINED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED;
import android.content.BroadcastReceiver;
@@ -107,6 +108,10 @@ public final class OverviewComponentObserver {
}
}
+ public boolean assistantGestureIsConstrained() {
+ return (mSystemUiStateFlags & SYSUI_STATE_ASSIST_GESTURE_CONSTRAINED) != 0;
+ }
+
/**
* Update overview intent and {@link ActivityControlHelper} based off the current launcher home
* component.