diff --git a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarAllAppsButtonContainer.kt b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarAllAppsButtonContainer.kt index e552b247b2..493265418f 100644 --- a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarAllAppsButtonContainer.kt +++ b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarAllAppsButtonContainer.kt @@ -26,11 +26,13 @@ import android.view.View import android.view.ViewConfiguration import androidx.annotation.DimenRes import androidx.annotation.DrawableRes +import androidx.core.view.setPadding import com.android.launcher3.R import com.android.launcher3.Utilities.dpToPx import com.android.launcher3.config.FeatureFlags.enableTaskbarPinning import com.android.launcher3.taskbar.TaskbarActivityContext import com.android.launcher3.taskbar.TaskbarViewCallbacks +import com.android.launcher3.util.DisplayController import com.android.launcher3.util.Executors.MAIN_EXECUTOR import com.android.launcher3.views.ActivityContext import com.android.launcher3.views.IconButtonView @@ -67,6 +69,9 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) backgroundTintList = ColorStateList.valueOf(TRANSPARENT) setIconDrawable(drawable) + if (!DisplayController.isTransientTaskbar(context)) { + setPadding(dpToPx(activityContext.taskbarSpecsEvaluator.taskbarIconPadding.toFloat())) + } setForegroundTint(activityContext.getColor(R.color.all_apps_button_color)) } diff --git a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarDividerContainer.kt b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarDividerContainer.kt index df61d8a69f..d5f72d5b1d 100644 --- a/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarDividerContainer.kt +++ b/quickstep/src/com/android/launcher3/taskbar/customization/TaskbarDividerContainer.kt @@ -21,10 +21,12 @@ import android.content.Context import android.content.res.ColorStateList import android.graphics.Color.TRANSPARENT import android.util.AttributeSet +import androidx.core.view.setPadding import com.android.launcher3.R import com.android.launcher3.Utilities.dpToPx import com.android.launcher3.taskbar.TaskbarActivityContext import com.android.launcher3.taskbar.TaskbarViewCallbacks +import com.android.launcher3.util.DisplayController import com.android.launcher3.views.ActivityContext import com.android.launcher3.views.IconButtonView @@ -50,6 +52,9 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 backgroundTintList = ColorStateList.valueOf(TRANSPARENT) val drawable = resources.getDrawable(R.drawable.taskbar_divider_button) setIconDrawable(drawable) + if (!DisplayController.isTransientTaskbar(context)) { + setPadding(dpToPx(activityContext.taskbarSpecsEvaluator.taskbarIconPadding.toFloat())) + } } @SuppressLint("ClickableViewAccessibility") diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index bf8cff627b..a0061989f1 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -80,8 +80,6 @@ import android.os.IBinder; import android.os.SystemClock; import android.util.Log; import android.util.Pair; -import android.util.TimeUtils; -import android.view.Choreographer; import android.view.MotionEvent; import android.view.RemoteAnimationTarget; import android.view.SurfaceControl; @@ -1736,30 +1734,13 @@ public abstract class AbsSwipeUpHandler< } private void handOffAnimation(PointF velocityPxPerMs) { - if (!TransitionAnimator.Companion.longLivedReturnAnimationsEnabled()) { - return; - } - - // This function is not guaranteed to be called inside a frame. We try to access the frame - // time immediately, but if we're not inside a frame we must post a callback to be run at - // the beginning of the next frame. - try { - handOffAnimationInternal(Choreographer.getInstance().getFrameTime(), velocityPxPerMs); - } catch (IllegalStateException e) { - Choreographer.getInstance().postFrameCallback( - frameTimeNanos -> handOffAnimationInternal( - frameTimeNanos / TimeUtils.NANOS_PER_MS, velocityPxPerMs)); - } - } - - private void handOffAnimationInternal(long timestamp, PointF velocityPxPerMs) { - if (mRecentsAnimationController == null) { + if (!TransitionAnimator.Companion.longLivedReturnAnimationsEnabled() + || mRecentsAnimationController == null) { return; } Pair targetsAndStates = - extractTargetsAndStates( - mRemoteTargetHandles, timestamp, velocityPxPerMs); + extractTargetsAndStates(mRemoteTargetHandles, velocityPxPerMs); mRecentsAnimationController.handOffAnimation( targetsAndStates.first, targetsAndStates.second); ActiveGestureProtoLogProxy.logHandOffAnimation(); diff --git a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java index fef4c3036c..ff9c9f65d0 100644 --- a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java +++ b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java @@ -353,6 +353,9 @@ public class TaskOverlayFactory implements ResourceBasedOverride { /** Sets visibility for the overlay associated elements. */ public void setVisibility(int visibility) {} + /** See {@link View#addChildrenForAccessibility(ArrayList)} */ + public void addChildForAccessibility(ArrayList outChildren) {} + private class ScreenshotSystemShortcut extends SystemShortcut { private final RecentsViewContainer mContainer; diff --git a/quickstep/src/com/android/quickstep/TaskViewUtils.java b/quickstep/src/com/android/quickstep/TaskViewUtils.java index 084cede033..783c87c8af 100644 --- a/quickstep/src/com/android/quickstep/TaskViewUtils.java +++ b/quickstep/src/com/android/quickstep/TaskViewUtils.java @@ -795,15 +795,14 @@ public final class TaskViewUtils { * second applies to the target in the same index of the first. * * @param handles The handles wrapping each target. - * @param timestamp The start time of the current frame. * @param velocityPxPerMs The current velocity of the target animations. */ @NonNull public static Pair extractTargetsAndStates( - @NonNull RemoteTargetHandle[] handles, long timestamp, - @NonNull PointF velocityPxPerMs) { + @NonNull RemoteTargetHandle[] handles, @NonNull PointF velocityPxPerMs) { RemoteAnimationTarget[] targets = new RemoteAnimationTarget[handles.length]; WindowAnimationState[] animationStates = new WindowAnimationState[handles.length]; + long timestamp = System.currentTimeMillis(); for (int i = 0; i < handles.length; i++) { targets[i] = handles[i].getTransformParams().getTargetSet().apps[i]; diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 743fa40030..2db942f5ec 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -4698,6 +4698,7 @@ public abstract class RecentsView< return; } setContentDescription(isEmpty ? mEmptyMessage : ""); + setFocusable(isEmpty); mShowEmptyMessage = isEmpty; updateEmptyStateUi(hasSizeChanged); invalidate(); diff --git a/quickstep/src/com/android/quickstep/views/TaskContainer.kt b/quickstep/src/com/android/quickstep/views/TaskContainer.kt index c940fb46b2..72c272671e 100644 --- a/quickstep/src/com/android/quickstep/views/TaskContainer.kt +++ b/quickstep/src/com/android/quickstep/views/TaskContainer.kt @@ -181,5 +181,6 @@ class TaskContainer( addAccessibleChildToList(snapshotView, outChildren) showWindowsView?.let { addAccessibleChildToList(it, outChildren) } digitalWellBeingToast?.let { addAccessibleChildToList(it, outChildren) } + overlay.addChildForAccessibility(outChildren) } } diff --git a/src/com/android/launcher3/logging/StatsLogManager.java b/src/com/android/launcher3/logging/StatsLogManager.java index 2550ebb107..dbab52a67e 100644 --- a/src/com/android/launcher3/logging/StatsLogManager.java +++ b/src/com/android/launcher3/logging/StatsLogManager.java @@ -843,6 +843,13 @@ public class StatsLogManager implements ResourceBasedOverride { @UiEvent(doc = "User long press nav handle and a long press runnable was created.") LAUNCHER_OMNI_GET_LONG_PRESS_RUNNABLE(1545), + + // One Grid Flags + @UiEvent(doc = "User sets the device in Fixed Landscape") + FIXED_LANDSCAPE_TOGGLE_ENABLE(2014), + + @UiEvent(doc = "User sets the device in Fixed Landscape") + FIXED_LANDSCAPE_TOGGLE_DISABLED(2020), // ADD MORE ;