Temporary fix to disable task#onClickListener during transition to overview am: 15b0f700fe am: 2ebbee6d0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13418432
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1523a3b11df375eefa0a840b2ca00b74193ebec5
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java
index 6271a44..faf5054 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java
@@ -31,6 +31,7 @@
import com.android.launcher3.touch.AbstractStateChangeTouchController;
import com.android.launcher3.touch.SingleAxisSwipeDetector;
import com.android.quickstep.SystemUiProxy;
+import com.android.quickstep.util.LayoutUtils;
import com.android.quickstep.views.AllAppsEduView;
/**
@@ -92,7 +93,8 @@
mLauncher.getDeviceProfile().isSeascape() == isDragTowardPositive;
return draggingFromNav ? OVERVIEW : NORMAL;
} else {
- return isDragTowardPositive ^ (fromState == OVERVIEW) ? OVERVIEW : NORMAL;
+ LauncherState startState = mStartState != null ? mStartState : fromState;
+ return isDragTowardPositive ^ (startState == OVERVIEW) ? OVERVIEW : NORMAL;
}
}
@@ -106,8 +108,8 @@
@Override
protected float getShiftRange() {
- return mLauncher.getDeviceProfile().isVerticalBarLayout()
- ? mLauncher.getDragLayer().getWidth() : super.getShiftRange();
+ // Should be in sync with TestProtocol.REQUEST_HOME_TO_OVERVIEW_SWIPE_HEIGHT
+ return LayoutUtils.getDefaultSwipeHeight(mLauncher, mLauncher.getDeviceProfile());
}
@Override
@@ -116,7 +118,7 @@
long maxAccuracy = (long) (2 * range);
mCurrentAnimation = mLauncher.getStateManager().createAnimationToNewWorkspace(mToState,
maxAccuracy, animComponent);
- return (mLauncher.getDeviceProfile().isSeascape() ? 2 : -2) / range;
+ return (mLauncher.getDeviceProfile().isSeascape() ? 1 : -1) / range;
}
@Override
@@ -134,5 +136,6 @@
AllAppsEduView.show(mLauncher);
}
}
+ mStartState = null;
}
}
diff --git a/quickstep/src/com/android/quickstep/ImageActionsApi.java b/quickstep/src/com/android/quickstep/ImageActionsApi.java
index b04905c..cb4d53a 100644
--- a/quickstep/src/com/android/quickstep/ImageActionsApi.java
+++ b/quickstep/src/com/android/quickstep/ImageActionsApi.java
@@ -83,8 +83,8 @@
* Share the image this api was constructed with.
*/
@UiThread
- public void startShareActivity() {
- ImageActionUtils.startShareActivity(mContext, mBitmapSupplier, null, null, TAG);
+ public void startShareActivity(Rect crop) {
+ ImageActionUtils.startShareActivity(mContext, mBitmapSupplier, crop, null, TAG);
}
/**
diff --git a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java
index 6677724..93ebd5a 100644
--- a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java
+++ b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java
@@ -159,7 +159,7 @@
@Override
public void onShare() {
if (isAllowedByPolicy) {
- endLiveTileMode(mImageApi::startShareActivity);
+ endLiveTileMode(() -> mImageApi.startShareActivity(null));
} else {
showBlockedByPolicyMessage();
}
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 067cf7f..dc7182f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -31,7 +31,7 @@
<style name="LauncherTheme" parent="@style/BaseLauncherTheme">
<item name="android:textColorSecondary">#DE000000</item>
- <item name="allAppsScrimColor">#FFFFFFFF</item>
+ <item name="allAppsScrimColor">?android:attr/colorBackgroundFloating</item>
<item name="allAppsInterimScrimAlpha">46</item>
<item name="allAppsNavBarScrimColor">#66FFFFFF</item>
<item name="allAppsTheme">@style/AllAppsTheme</item>
@@ -47,9 +47,9 @@
<item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
<item name="widgetsTheme">@style/WidgetContainerTheme</item>
<item name="folderDotColor">?android:attr/colorPrimary</item>
- <item name="folderFillColor">#CDFFFFFF</item>
+ <item name="folderFillColor">?android:attr/colorBackground</item>
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
- <item name="folderTextColor">#FF212121</item>
+ <item name="folderTextColor">?android:attr/textColorPrimary</item>
<item name="folderHintColor">#89616161</item>
<item name="loadingIconColor">#CCFFFFFF</item>
<item name="iconOnlyShortcutColor">?android:attr/textColorSecondary</item>
@@ -94,7 +94,7 @@
<item name="android:textColorHint">#A0FFFFFF</item>
<item name="android:colorControlHighlight">#A0FFFFFF</item>
<item name="android:colorPrimary">#FF212121</item>
- <item name="allAppsScrimColor">#FF000000</item>
+ <item name="allAppsScrimColor">?android:attr/colorBackgroundFloating</item>
<item name="allAppsInterimScrimAlpha">102</item>
<item name="allAppsNavBarScrimColor">#80000000</item>
<item name="allAppsTheme">@style/AllAppsTheme.Dark</item>
@@ -102,10 +102,10 @@
<item name="popupColorSecondary">#202124</item>
<item name="popupColorTertiary">#757575</item> <!-- Gray 600 -->
<item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item>
- <item name="folderDotColor">#FF464646</item>
- <item name="folderFillColor">#DD3C4043</item> <!-- 87% GM2 800 -->
- <item name="folderIconBorderColor">#FF80868B</item>
- <item name="folderTextColor">@android:color/white</item>
+ <item name="folderDotColor">?android:attr/colorPrimary</item>
+ <item name="folderFillColor">?android:attr/colorBackground</item>
+ <item name="folderIconBorderColor">?android:attr/colorPrimary</item>
+ <item name="folderTextColor">?android:attr/textColorPrimary</item>
<item name="folderHintColor">#89CCCCCC</item>
<item name="isMainColorDark">true</item>
<item name="loadingIconColor">#99FFFFFF</item>
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 1c5c222..086d665 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -95,7 +95,7 @@
"ENABLE_SUGGESTED_ACTIONS_OVERVIEW", true, "Show chip hints on the overview screen");
- public static final BooleanFlag ENABLE_DEVICE_SEARCH = getDebugFlag(
+ public static final BooleanFlag ENABLE_DEVICE_SEARCH = new DeviceFlag(
"ENABLE_DEVICE_SEARCH", false, "Allows on device search in all apps");
public static final BooleanFlag USE_SEARCH_API = getDebugFlag(
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index 10cd04c..484c76f 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -67,8 +67,9 @@
/**
* Play an atomic recents animation when the progress from NORMAL to OVERVIEW reaches this.
+ * TODO: Remove the atomic animation altogether and just go to OVERVIEW directly (b/175137718).
*/
- public static final float ATOMIC_OVERVIEW_ANIM_THRESHOLD = 0.5f;
+ public static final float ATOMIC_OVERVIEW_ANIM_THRESHOLD = 1f;
protected final long ATOMIC_DURATION = getAtomicDuration();
protected final Launcher mLauncher;
@@ -335,9 +336,7 @@
if (!goingBetweenNormalAndOverview(fromState, toState)) {
return;
}
- float threshold = toState == OVERVIEW ? ATOMIC_OVERVIEW_ANIM_THRESHOLD
- : 1f - ATOMIC_OVERVIEW_ANIM_THRESHOLD;
- boolean passedThreshold = progress >= threshold;
+ boolean passedThreshold = progress >= ATOMIC_OVERVIEW_ANIM_THRESHOLD;
if (passedThreshold != mPassedOverviewAtomicThreshold) {
LauncherState atomicFromState = passedThreshold ? fromState: toState;
LauncherState atomicToState = passedThreshold ? toState : fromState;