Snap for 12715656 from ded458db94 to 25Q1-release
Change-Id: I3cf15cd0db81f88948d89f482c62406b1b0ae00b
This commit is contained in:
+5
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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<RemoteAnimationTarget[], WindowAnimationState[]> targetsAndStates =
|
||||
extractTargetsAndStates(
|
||||
mRemoteTargetHandles, timestamp, velocityPxPerMs);
|
||||
extractTargetsAndStates(mRemoteTargetHandles, velocityPxPerMs);
|
||||
mRecentsAnimationController.handOffAnimation(
|
||||
targetsAndStates.first, targetsAndStates.second);
|
||||
ActiveGestureProtoLogProxy.logHandOffAnimation();
|
||||
|
||||
@@ -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<View> outChildren) {}
|
||||
|
||||
private class ScreenshotSystemShortcut extends SystemShortcut {
|
||||
|
||||
private final RecentsViewContainer mContainer;
|
||||
|
||||
@@ -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<RemoteAnimationTarget[], WindowAnimationState[]> 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];
|
||||
|
||||
@@ -4698,6 +4698,7 @@ public abstract class RecentsView<
|
||||
return;
|
||||
}
|
||||
setContentDescription(isEmpty ? mEmptyMessage : "");
|
||||
setFocusable(isEmpty);
|
||||
mShowEmptyMessage = isEmpty;
|
||||
updateEmptyStateUi(hasSizeChanged);
|
||||
invalidate();
|
||||
|
||||
@@ -181,5 +181,6 @@ class TaskContainer(
|
||||
addAccessibleChildToList(snapshotView, outChildren)
|
||||
showWindowsView?.let { addAccessibleChildToList(it, outChildren) }
|
||||
digitalWellBeingToast?.let { addAccessibleChildToList(it, outChildren) }
|
||||
overlay.addChildForAccessibility(outChildren)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user