fix recents activity crash on Android 12 (#4530)

* fix recents activity crash on Android 12

(cherry picked from commit cd652cc13716f8e34340342cda23e605798fc74e)

* fix code style

* Fixed crash in 12.1

---------

Co-authored-by: Evgeniy Mineev <e.mineev@crazypanda.ru>
Co-authored-by: MrSluffy <werdna.jac@gmail.com>
This commit is contained in:
sandstranger
2024-07-07 03:37:53 +04:00
committed by GitHub
parent c15a7580e0
commit 752af659b6

View File

@@ -30,11 +30,7 @@ public class QuickstepCompatFactoryVS extends QuickstepCompatFactoryVR {
@NonNull
@Override
public RemoteTransitionCompat getRemoteTransitionCompat() {
try {
return this::createRemoteTransition;
} catch (Throwable t) {
return super.getRemoteTransitionCompat();
}
return this::createRemoteTransition;
}
// TODO remove this as it causing glitches on first launch opening/closing app
@@ -51,7 +47,8 @@ public class QuickstepCompatFactoryVS extends QuickstepCompatFactoryVR {
| InstantiationException
| InvocationTargetException
| NoSuchMethodException e) {
throw new RuntimeException("Error creating RemoteTransitionCompat" + debugName, e);
return super.getRemoteTransitionCompat()
.getRemoteTransition(remoteTransition, appThread, debugName);
}
}
}