mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-11 06:44:00 +00:00
Fix recents not working on NothingOS 2.6 (#4940)
Pull #4417 implemented this incompletely, resulting in breakage in NothingOS 2.6. Transaction needs to be applied so that the animation chain can continue. Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
This commit is contained in:
@@ -31,6 +31,8 @@ import android.os.Handler;
|
|||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.view.IRemoteAnimationFinishedCallback;
|
import android.view.IRemoteAnimationFinishedCallback;
|
||||||
import android.view.RemoteAnimationTarget;
|
import android.view.RemoteAnimationTarget;
|
||||||
|
import android.view.SurfaceControl;
|
||||||
|
import android.window.TransitionInfo;
|
||||||
|
|
||||||
import androidx.annotation.BinderThread;
|
import androidx.annotation.BinderThread;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@@ -102,6 +104,22 @@ public class LauncherAnimationRunner extends RemoteAnimationRunnerCompat {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Introduced in NothingOS 2.5.5, needed in 2.6
|
||||||
|
@BinderThread
|
||||||
|
public void onAnimationStartWithSurfaceTransaction(
|
||||||
|
int transit,
|
||||||
|
TransitionInfo transitionInfo,
|
||||||
|
SurfaceControl.Transaction transaction,
|
||||||
|
RemoteAnimationTarget[] appTargets,
|
||||||
|
RemoteAnimationTarget[] wallpaperTargets,
|
||||||
|
RemoteAnimationTarget[] nonAppTargets,
|
||||||
|
Runnable runnable) {
|
||||||
|
if (transaction != null) {
|
||||||
|
transaction.apply();
|
||||||
|
}
|
||||||
|
onAnimationStart(transit, appTargets, wallpaperTargets, nonAppTargets, runnable);
|
||||||
|
}
|
||||||
|
|
||||||
private RemoteAnimationFactory getFactory() {
|
private RemoteAnimationFactory getFactory() {
|
||||||
RemoteAnimationFactory factory = mFactory.get();
|
RemoteAnimationFactory factory = mFactory.get();
|
||||||
return factory != null ? factory : DEFAULT_FACTORY;
|
return factory != null ? factory : DEFAULT_FACTORY;
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent
|
|||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.util.ArraySet;
|
import android.util.ArraySet;
|
||||||
import android.view.RemoteAnimationTarget;
|
import android.view.RemoteAnimationTarget;
|
||||||
|
import android.view.SurfaceControl;
|
||||||
|
import android.window.TransitionInfo;
|
||||||
|
|
||||||
import androidx.annotation.BinderThread;
|
import androidx.annotation.BinderThread;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -99,6 +101,18 @@ public class RecentsAnimationCallbacks implements
|
|||||||
homeContentInsets, minimizedHomeBounds);
|
homeContentInsets, minimizedHomeBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Introduced in NothingOS 2.5.5, needed in 2.6
|
||||||
|
@BinderThread
|
||||||
|
public final void onAnimationStart(RecentsAnimationControllerCompat controller,
|
||||||
|
TransitionInfo transitionInfo, SurfaceControl.Transaction transaction,
|
||||||
|
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
|
||||||
|
Rect homeContentInsets, Rect minimizedHomeBounds) {
|
||||||
|
if (transaction != null) {
|
||||||
|
transaction.apply();
|
||||||
|
}
|
||||||
|
onAnimationStart(controller, apps, wallpapers, homeContentInsets, minimizedHomeBounds);
|
||||||
|
}
|
||||||
|
|
||||||
// Called only in R+ platform
|
// Called only in R+ platform
|
||||||
@BinderThread
|
@BinderThread
|
||||||
public final void onAnimationStart(RecentsAnimationControllerCompat animationController,
|
public final void onAnimationStart(RecentsAnimationControllerCompat animationController,
|
||||||
|
|||||||
@@ -1489,8 +1489,9 @@ public class SystemUiProxy implements ISystemUiProxy {
|
|||||||
RemoteAnimationTarget[] wallpapers,
|
RemoteAnimationTarget[] wallpapers,
|
||||||
Rect homeContentInsets,
|
Rect homeContentInsets,
|
||||||
Rect minimizedHomeBounds) {
|
Rect minimizedHomeBounds) {
|
||||||
listener.onAnimationStart(new RecentsAnimationControllerCompat(controller), apps,
|
listener.onAnimationStart(new RecentsAnimationControllerCompat(controller),
|
||||||
wallpapers, homeContentInsets, minimizedHomeBounds);
|
transitionInfo, transaction, apps, wallpapers,
|
||||||
|
homeContentInsets, minimizedHomeBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ package com.android.systemui.shared.system;
|
|||||||
|
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.view.RemoteAnimationTarget;
|
import android.view.RemoteAnimationTarget;
|
||||||
|
import android.view.SurfaceControl;
|
||||||
|
import android.window.TransitionInfo;
|
||||||
|
|
||||||
import com.android.systemui.shared.recents.model.ThumbnailData;
|
import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||||
|
|
||||||
@@ -31,6 +33,12 @@ public interface RecentsAnimationListener {
|
|||||||
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
|
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
|
||||||
Rect homeContentInsets, Rect minimizedHomeBounds);
|
Rect homeContentInsets, Rect minimizedHomeBounds);
|
||||||
|
|
||||||
|
// Introduced in NothingOS 2.5.5, needed in 2.6
|
||||||
|
void onAnimationStart(RecentsAnimationControllerCompat controller,
|
||||||
|
TransitionInfo transitionInfo, SurfaceControl.Transaction transaction,
|
||||||
|
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
|
||||||
|
Rect homeContentInsets, Rect minimizedHomeBounds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the animation into Recents was canceled. This call is made on the binder thread.
|
* Called when the animation into Recents was canceled. This call is made on the binder thread.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user