Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
897c145
Launcher3: Add default style for recents view animation
neobuddy89 May 17, 2026
04489ed
Launcher3: Fix race condition in recent view animation styles
neobuddy89 May 19, 2026
9cb3312
Launcher3: Add simple optimizations
RealJohnGalt May 18, 2026
3378db6
Launcher3: Reduce per-frame allocations in QuickstepTransitionManager
RealJohnGalt May 18, 2026
22c82b9
Launcher3: AllAppsList: Move calculateDiff to bg thread
RealJohnGalt May 18, 2026
4f1d3ad
Launcher3: AllApps: Minimize hw layers only when necessary
RealJohnGalt May 18, 2026
5a68775
Launcher3: Minimize per-frame allocations and calls in QuickstepTrans…
RealJohnGalt May 19, 2026
77d1615
Launcher3: Minimize per-frame allocations and calls in RecentsView
RealJohnGalt May 19, 2026
e4ced13
Launcher3: Cache spring parameters in RectFSpringAnim
RealJohnGalt May 19, 2026
b91f9b1
Launcher3: Remove recents view animation styles on tablets
neobuddy89 May 19, 2026
450720a
New Crowdin updates (#538)
gwolf2u May 23, 2026
6318b42
New translations cr_strings.xml (Spanish)
gwolf2u May 25, 2026
a093c39
New translations cr_strings.xml (Romanian)
gwolf2u May 25, 2026
23ec982
New translations cr_strings.xml (French)
gwolf2u May 25, 2026
1ab40e6
New translations cr_strings.xml (Arabic)
gwolf2u May 25, 2026
b55692a
New translations cr_strings.xml (Belarusian)
gwolf2u May 25, 2026
0f1db74
New translations cr_strings.xml (Bulgarian)
gwolf2u May 25, 2026
b15dbb5
New translations cr_strings.xml (Catalan)
gwolf2u May 25, 2026
d10c826
New translations cr_strings.xml (Czech)
gwolf2u May 25, 2026
3e98faf
New translations cr_strings.xml (German)
gwolf2u May 25, 2026
14f0f0e
New translations cr_strings.xml (Greek)
gwolf2u May 25, 2026
a385f96
New translations cr_strings.xml (Finnish)
gwolf2u May 25, 2026
c567b4d
New translations cr_strings.xml (Hebrew)
gwolf2u May 25, 2026
7c6068c
New translations cr_strings.xml (Hungarian)
gwolf2u May 25, 2026
24c821f
New translations cr_strings.xml (Italian)
gwolf2u May 25, 2026
602d922
New translations cr_strings.xml (Japanese)
gwolf2u May 25, 2026
f622b55
New translations cr_strings.xml (Korean)
gwolf2u May 25, 2026
a0e9801
New translations cr_strings.xml (Kurdish)
gwolf2u May 25, 2026
9daf0b6
New translations cr_strings.xml (Dutch)
gwolf2u May 25, 2026
7ffa65b
New translations cr_strings.xml (Polish)
gwolf2u May 25, 2026
b66f7d2
New translations cr_strings.xml (Portuguese)
gwolf2u May 25, 2026
cc4447e
New translations cr_strings.xml (Russian)
gwolf2u May 25, 2026
91b075e
New translations cr_strings.xml (Slovak)
gwolf2u May 25, 2026
3112fa1
New translations cr_strings.xml (Turkish)
gwolf2u May 25, 2026
2066481
New translations cr_strings.xml (Ukrainian)
gwolf2u May 25, 2026
2acd598
New translations cr_strings.xml (Chinese Simplified)
gwolf2u May 25, 2026
63076fd
New translations cr_strings.xml (Chinese Traditional)
gwolf2u May 25, 2026
8e7b7ca
New translations cr_strings.xml (Vietnamese)
gwolf2u May 25, 2026
8564ab2
New translations cr_strings.xml (Portuguese, Brazilian)
gwolf2u May 25, 2026
924259d
New translations cr_strings.xml (Indonesian)
gwolf2u May 25, 2026
da7389a
New translations cr_strings.xml (Persian)
gwolf2u May 25, 2026
5da2b33
New translations cr_strings.xml (Tamil)
gwolf2u May 25, 2026
75262ca
New translations cr_strings.xml (Azerbaijani)
gwolf2u May 25, 2026
b516aa4
New translations cr_strings.xml (Hindi)
gwolf2u May 25, 2026
cf85ba1
New translations cr_strings.xml (Serbian (Latin))
gwolf2u May 25, 2026
e5125b4
New translations cr_strings.xml (Santali)
gwolf2u May 25, 2026
273ced2
New translations cr_strings.xml (Hungarian)
gwolf2u May 25, 2026
39311f5
New translations cr_strings.xml (Dutch)
gwolf2u May 25, 2026
f2d06cf
New translations cr_strings.xml (Russian)
gwolf2u May 25, 2026
94b91fe
New translations cr_strings.xml (Turkish)
gwolf2u May 25, 2026
456573c
New translations cr_strings.xml (Ukrainian)
gwolf2u May 25, 2026
61dd769
New translations cr_strings.xml (Czech)
gwolf2u May 25, 2026
d7da1ad
New translations cr_strings.xml (Polish)
gwolf2u May 25, 2026
57b15d8
New translations cr_strings.xml (Indonesian)
gwolf2u May 25, 2026
555c7fa
New translations cr_strings.xml (Spanish)
gwolf2u May 25, 2026
2a78a88
New translations cr_strings.xml (German)
gwolf2u May 25, 2026
54566a7
New translations cr_strings.xml (Chinese Simplified)
gwolf2u May 26, 2026
90727c6
New translations cr_strings.xml (Vietnamese)
gwolf2u May 29, 2026
d35ff2d
New translations cr_strings.xml (Vietnamese)
gwolf2u May 29, 2026
2af449b
New translations cr_strings.xml (Vietnamese)
gwolf2u May 29, 2026
edb6a15
New translations cr_strings.xml (Vietnamese)
gwolf2u May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 58 additions & 53 deletions quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,16 @@ private Pair<AnimatorSet, Runnable> getLauncherContentAnimator(boolean isAppOpen
ObjectAnimator alpha = ObjectAnimator.ofFloat(appsView, View.ALPHA, alphas);
alpha.setDuration(CONTENT_ALPHA_DURATION);
alpha.setInterpolator(LINEAR);
appsView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
alpha.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
appsView.setLayerType(View.LAYER_TYPE_NONE, null);
}
});

if (!mDeviceProfile.getDeviceProperties().isTablet()) {
appsView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
alpha.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
appsView.setLayerType(View.LAYER_TYPE_NONE, null);
}
});
}

if (!skipAllAppsScale) {
SCALE_PROPERTY.set(appsView, scales[0]);
Expand Down Expand Up @@ -774,8 +777,11 @@ private Animator getOpeningWindowAnimators(View v,
wallpaperTargets, nonAppTargets, MODE_OPENING);
int rotationChange = getRotationChange(appTargets);
Rect windowTargetBounds = getWindowTargetBounds(appTargets, rotationChange);
final int displayWidth = mDeviceProfile.getDeviceProperties().getWidthPx();
final int displayHeight = mDeviceProfile.getDeviceProperties().getHeightPx();
final int[] bottomInsetPos = new int[]{
mSystemUiProxy.getHomeVisibilityState().getNavbarInsetPosition()};
final int[] cachedNavbarInset = new int[]{bottomInsetPos[0]};
final RemoteAnimationTarget target = openingTargets.getFirstAppTarget();
final boolean cropToInset = shouldCropToInset(target);
if (cropToInset) {
Expand All @@ -794,6 +800,7 @@ private Animator getOpeningWindowAnimators(View v,
true /* isOpening */);
Rect crop = new Rect();
Matrix matrix = new Matrix();
Rect closingTargetCrop = new Rect();

SurfaceTransactionApplier surfaceApplier =
new SurfaceTransactionApplier(floatingView);
Expand All @@ -815,6 +822,9 @@ private Animator getOpeningWindowAnimators(View v,
hasSplashScreen = false;
}

final int windowIconSize = ResourceUtils.getDimenByName("starting_surface_icon_size",
mLauncher.getResources(), 108);

AnimOpenProperties prop = new AnimOpenProperties(mLauncher.getResources(), mDeviceProfile,
windowTargetBounds, launcherIconBounds, v, dragLayerBounds[0], dragLayerBounds[1],
hasSplashScreen, floatingView.isDifferentFromAppIcon());
Expand Down Expand Up @@ -918,37 +928,31 @@ private boolean newShouldShowEduOnAppLaunch() {

@Override
public void onUpdate(float percent, boolean initOnly) {
if (cropToInset && bottomInsetPos[0] != mSystemUiProxy.getHomeVisibilityState()
.getNavbarInsetPosition()) {
final RemoteAnimationTarget target = openingTargets.getFirstAppTarget();
bottomInsetPos[0] = mSystemUiProxy.getHomeVisibilityState()
if (cropToInset && bottomInsetPos[0] != cachedNavbarInset[0]) {
cachedNavbarInset[0] = mSystemUiProxy.getHomeVisibilityState()
.getNavbarInsetPosition();
bottomInsetPos[0] = cachedNavbarInset[0];
final RemoteAnimationTarget target = openingTargets.getFirstAppTarget();
final Rect bounds = target != null
? target.screenSpaceBounds : windowTargetBounds;
// Animate to above the taskbar.
int bottomLevel = Math.min(bottomInsetPos[0], bounds.bottom);
windowTargetBounds.bottom = bottomLevel;
final int endHeight = bottomLevel - bounds.top;

AnimOpenProperties prop = new AnimOpenProperties(mLauncher.getResources(),
mDeviceProfile, windowTargetBounds, launcherIconBounds, v,
dragLayerBounds[0], dragLayerBounds[1], hasSplashScreen,
floatingView.isDifferentFromAppIcon());
mCropRectCenterY = new FloatProp(prop.cropCenterYStart, prop.cropCenterYEnd,
mOpeningInterpolator);
mCropRectHeight = new FloatProp(prop.cropHeightStart, prop.cropHeightEnd,
mOpeningInterpolator);
mDy = new FloatProp(0, prop.dY, mOpeningInterpolator);
mIconScaleToFitScreen = new FloatProp(prop.initialAppIconScale,
prop.finalAppIconScale, mOpeningInterpolator);
float smallestSize = Math.min(windowTargetBounds.height(),
windowTargetBounds.width());
float maxIconScale = Math.max(smallestSize / launcherIconBounds.width(),
smallestSize / launcherIconBounds.height());
float newDY = windowTargetBounds.centerY() - dragLayerBounds[1]
- launcherIconBounds.centerY();
float interpolatedPercent = mOpeningInterpolator.getInterpolation(percent);
mCropRectHeight.value = Utilities.mapRange(interpolatedPercent,
prop.cropHeightStart, prop.cropHeightEnd);
mCropRectCenterY.value = Utilities.mapRange(interpolatedPercent,
prop.cropCenterYStart, prop.cropCenterYEnd);
mDy.value = Utilities.mapRange(interpolatedPercent, 0, prop.dY);
mIconScaleToFitScreen.value = Utilities.mapRange(interpolatedPercent,
prop.initialAppIconScale, prop.finalAppIconScale);
mCropRectCenterY.value = windowTargetBounds.centerY();
mCropRectHeight.value = windowIconSize
+ interpolatedPercent * (windowTargetBounds.height() - windowIconSize);
mDy.value = interpolatedPercent * newDY;
mIconScaleToFitScreen.value = prop.initialAppIconScale
+ interpolatedPercent * (maxIconScale - prop.initialAppIconScale);
}

// Calculate the size of the scaled icon.
Expand All @@ -964,8 +968,8 @@ public void onUpdate(float percent, boolean initOnly) {
final int windowCropWidth = crop.width();
final int windowCropHeight = crop.height();
if (rotationChange != 0) {
Utilities.rotateBounds(crop, mDeviceProfile.getDeviceProperties().getWidthPx(),
mDeviceProfile.getDeviceProperties().getHeightPx(), rotationChange);
Utilities.rotateBounds(crop, displayWidth,
displayHeight, rotationChange);
}

// Scale the size of the icon to match the size of the window crop.
Expand Down Expand Up @@ -1012,14 +1016,14 @@ public void onUpdate(float percent, boolean initOnly) {
matrix.setScale(scale, scale);
if (rotationChange == 1) {
matrix.postTranslate(windowTransY0,
mDeviceProfile.getDeviceProperties().getWidthPx() - (windowTransX0 + scaledCropWidth));
displayWidth - (windowTransX0 + scaledCropWidth));
} else if (rotationChange == 2) {
matrix.postTranslate(
mDeviceProfile.getDeviceProperties().getWidthPx() - (windowTransX0 + scaledCropWidth),
mDeviceProfile.getDeviceProperties().getHeightPx() - (windowTransY0 + scaledCropHeight));
displayWidth - (windowTransX0 + scaledCropWidth),
displayHeight - (windowTransY0 + scaledCropHeight));
} else if (rotationChange == 3) {
matrix.postTranslate(
mDeviceProfile.getDeviceProperties().getHeightPx() - (windowTransY0 + scaledCropHeight),
displayHeight - (windowTransY0 + scaledCropHeight),
windowTransX0);
} else {
matrix.postTranslate(windowTransX0, windowTransY0);
Expand All @@ -1038,20 +1042,20 @@ public void onUpdate(float percent, boolean initOnly) {
} else {
tmpPos.set(target.position.x, target.position.y);
}
final Rect crop = new Rect(target.screenSpaceBounds);
crop.offsetTo(0, 0);
closingTargetCrop.set(target.screenSpaceBounds);
closingTargetCrop.offsetTo(0, 0);

if ((rotationChange % 2) == 1) {
int tmp = crop.right;
crop.right = crop.bottom;
crop.bottom = tmp;
int tmp = closingTargetCrop.right;
closingTargetCrop.right = closingTargetCrop.bottom;
closingTargetCrop.bottom = tmp;
tmp = tmpPos.x;
tmpPos.x = tmpPos.y;
tmpPos.y = tmp;
}
matrix.setTranslate(tmpPos.x, tmpPos.y);
builder.setMatrix(matrix)
.setWindowCrop(crop)
.setWindowCrop(closingTargetCrop)
.setAlpha(1f);
}
}
Expand Down Expand Up @@ -1671,6 +1675,8 @@ private Animator getFallbackClosingWindowAnimators(RemoteAnimationTarget[] appTa
Matrix matrix = new Matrix();
Point tmpPos = new Point();
Rect tmpRect = new Rect();
Rect fallbackCrop = new Rect();
SurfaceTransaction transaction = new SurfaceTransaction();
ValueAnimator closingAnimator = ValueAnimator.ofFloat(0, 1);
int duration = CLOSING_TRANSITION_DURATION_MS;
float windowCornerRadius = getWindowCornerRadius(mLauncher);
Expand All @@ -1690,7 +1696,6 @@ private Animator getFallbackClosingWindowAnimators(RemoteAnimationTarget[] appTa

@Override
public void onUpdate(float percent, boolean initOnly) {
SurfaceTransaction transaction = new SurfaceTransaction();
for (int i = appTargets.length - 1; i >= 0; i--) {
RemoteAnimationTarget target = appTargets[i];
SurfaceProperties builder = transaction.forSurface(target.leash);
Expand All @@ -1701,29 +1706,29 @@ public void onUpdate(float percent, boolean initOnly) {
tmpPos.set(target.position.x, target.position.y);
}

final Rect crop = new Rect(target.localBounds);
crop.offsetTo(0, 0);
fallbackCrop.set(target.localBounds);
fallbackCrop.offsetTo(0, 0);
if (target.mode == MODE_CLOSING) {
tmpRect.set(target.screenSpaceBounds);
if ((rotationChange % 2) != 0) {
final int right = crop.right;
crop.right = crop.bottom;
crop.bottom = right;
final int right = fallbackCrop.right;
fallbackCrop.right = fallbackCrop.bottom;
fallbackCrop.bottom = right;
}
matrix.setScale(mScale.value, mScale.value,
tmpRect.centerX(),
tmpRect.centerY());
matrix.postTranslate(0, mDy.value);
matrix.postTranslate(tmpPos.x, tmpPos.y);
builder.setMatrix(matrix)
.setWindowCrop(crop)
.setWindowCrop(fallbackCrop)
.setAlpha(mAlpha.value)
.setCornerRadius(windowCornerRadius)
.setShadowRadius(mShadowRadius.value);
} else if (target.mode == MODE_OPENING) {
matrix.setTranslate(tmpPos.x, tmpPos.y);
builder.setMatrix(matrix)
.setWindowCrop(crop)
.setWindowCrop(fallbackCrop)
.setAlpha(1f);
}
}
Expand Down Expand Up @@ -2353,6 +2358,7 @@ private class SpringAnimRunner implements RectFSpringAnim.OnUpdateListener {
private final Rect mWindowOriginalBounds = new Rect();

private final Rect mTmpRect = new Rect();
private final SurfaceTransaction mTransaction = new SurfaceTransaction();

/**
* Constructor for SpringAnimRunner
Expand Down Expand Up @@ -2395,15 +2401,14 @@ private class SpringAnimRunner implements RectFSpringAnim.OnUpdateListener {
}

public float getCornerRadius(float progress) {
return Utilities.mapRange(progress, mStartRadius, mEndRadius);
return mStartRadius + progress * (mEndRadius - mStartRadius);
}

@Override
public void onUpdate(RectF currentRectF, float progress) {
SurfaceTransaction transaction = new SurfaceTransaction();
for (int i = mAppTargets.length - 1; i >= 0; i--) {
RemoteAnimationTarget target = mAppTargets[i];
SurfaceProperties builder = transaction.forSurface(target.leash);
SurfaceProperties builder = mTransaction.forSurface(target.leash);

if (target.localBounds != null) {
mTmpPos.set(target.localBounds.left, target.localBounds.top);
Expand Down Expand Up @@ -2449,7 +2454,7 @@ public void onUpdate(RectF currentRectF, float progress) {
.setAlpha(1f);
}
}
mSurfaceApplier.scheduleApply(transaction);
mSurfaceApplier.scheduleApply(mTransaction);
}

protected float getWindowAlpha(float progress) {
Expand Down
6 changes: 4 additions & 2 deletions quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -2719,9 +2719,11 @@ private boolean isKeyboardTaskFocusPending() {
}

private void onRecentsViewScroll() {
if (moveWindowWithRecentsScroll()) {
onCurrentShiftUpdated();
if (!moveWindowWithRecentsScroll()) return;
if (mRecentsView != null && mRecentsView.isOverlapStyleActive()) {
return;
}
onCurrentShiftUpdated();
}

protected void startNewTask(@Nullable TaskView taskToLaunch, Consumer<Boolean> resultCallback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import android.animation.ValueAnimator;
import android.view.animation.Interpolator;

import com.android.launcher3.Utilities;

import java.util.ArrayList;

/**
Expand All @@ -37,7 +35,7 @@ public final void onAnimationUpdate(ValueAnimator animator) {
for (int i = mAllProperties.size() - 1; i >= 0; i--) {
FloatProp prop = mAllProperties.get(i);
float interpolatedPercent = prop.mInterpolator.getInterpolation(percent);
prop.value = Utilities.mapRange(interpolatedPercent, prop.mStart, prop.mEnd);
prop.value = prop.mStart + interpolatedPercent * (prop.mEnd - prop.mStart);
}
onUpdate(percent, false /* initOnly */);
}
Expand Down
Loading