From 8fc5f39007db48d4e744401807e8004aaa0684e9 Mon Sep 17 00:00:00 2001 From: Sebastian Franco Date: Wed, 20 Nov 2024 16:02:41 -0800 Subject: [PATCH 1/5] Add Event log for FIXED_LANDSCAPE_TOGGLE Bug: 364711735 Test: NA Flag: com.android.launcher3.one_grid_specs Change-Id: I154839e78a197444ccbcbd86bba101865c6a964b --- src/com/android/launcher3/logging/StatsLogManager.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 ; From f86e0e4b884597a63c40cfeb198f254a39960bf5 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Mon, 25 Nov 2024 09:34:12 -0800 Subject: [PATCH 2/5] Remove padding from All Apps and Divider views for transient taskbar. (Initial CL removed padding always) I0f9cce376d47918e69a65ed288f10143930ee3be Bug: 375661139 Test: confirmed with design team Flag: EXEMPT bugfix Change-Id: I467d0a5ae3ab48ebebc5a05f7a0902ddd01f8084 --- .../taskbar/customization/TaskbarAllAppsButtonContainer.kt | 5 +++++ .../taskbar/customization/TaskbarDividerContainer.kt | 5 +++++ 2 files changed, 10 insertions(+) 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") From 0aee46e098b704859fe32879c58cfa256ee0dfb4 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Mon, 25 Nov 2024 14:33:58 +0000 Subject: [PATCH 3/5] Add TaskOverlay children for accessibility - ag/28947579 add a speicifc order for children of TaskView to be added for accessibility. All TaskView children will need to added through TaskContainer.addChildForAccessibility Fix: 379802031 Fix: 380016834 Fix: 204280593 Test: Go to Select mode, ensures Talkback can cycle through text selection boxes Flag: EXEMPT BUG_FIX Change-Id: Id7991a8b3e76fe47f562e338e9967c8e85fa4908 --- quickstep/src/com/android/quickstep/TaskOverlayFactory.java | 3 +++ quickstep/src/com/android/quickstep/views/TaskContainer.kt | 1 + 2 files changed, 4 insertions(+) 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/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) } } From 9155cf9066dcca9023425bdbe7f25fd64a322502 Mon Sep 17 00:00:00 2001 From: "Chaitanya Cheemala (xWF)" Date: Tue, 26 Nov 2024 10:12:12 +0000 Subject: [PATCH 4/5] Revert "Use the Coreographer's frame time for a more reliable ti..." Revert submission 30509816-raf-timing Reason for revert: Likely culprit for b/381006945 - verified through ABTD before revert submission as part of standard investigation process. Reverted changes: /q/submissionid:30509816-raf-timing Change-Id: Iaed968120be662df8d915bac61e7cfa5b936f35c --- .../android/quickstep/AbsSwipeUpHandler.java | 25 +++---------------- .../com/android/quickstep/TaskViewUtils.java | 5 ++-- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 27790ce89e..21c4d8cffb 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; @@ -1730,30 +1728,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/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]; From 6c85912736d67bc7a4a8d8d677bed0ad73da35a8 Mon Sep 17 00:00:00 2001 From: Uwais Ashraf Date: Tue, 26 Nov 2024 11:17:00 +0000 Subject: [PATCH 5/5] Make RV focusable when empty to read out content desc for TalkBack. Fix: 379638096 Flag: EXEMPT BUG_FIX Test: Manual - go to overview with and without tasks. Check TalkBack. Change-Id: I1f3faace530ed3c9b0384b94dbc163f5b8c15dda --- quickstep/src/com/android/quickstep/views/RecentsView.java | 1 + 1 file changed, 1 insertion(+) 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();