QuickSwitch Compat Q to U (#3948)

Initial support quickstep, Android versions from Q to U, ensuring a smooth and efficient user experience. Enjoy effortless navigation and swift app switching on your Android device with QuickSwitch's compatibility across the Q, R, S, T, and U.


Co-authored-by: Goooler <wangzongler@gmail.com>
Co-authored-by: 无言 <57122860+liu-wanshun@users.noreply.github.com>
This commit is contained in:
John Andrew Camu
2024-01-26 05:59:47 +08:00
committed by GitHub
parent f63aa1e315
commit c31b41ae73
111 changed files with 4549 additions and 604 deletions

View File

@@ -86,6 +86,7 @@ import java.util.Objects;
import java.util.stream.IntStream;
import app.lawnchair.LawnchairApp;
import app.lawnchair.compat.LawnchairQuickstepCompat;
/**
* Model delegate which loads prediction items
@@ -259,8 +260,9 @@ public class QuickstepModelDelegate extends ModelDelegate {
* atom.
*/
protected void registerSnapshotLoggingCallback() {
if (mStatsManager == null) {
if (mStatsManager == null || !LawnchairQuickstepCompat.ATLEAST_R) {
Log.d(TAG, "Failed to get StatsManager");
return;
}
try {
@@ -330,7 +332,7 @@ public class QuickstepModelDelegate extends ModelDelegate {
super.destroy();
mActive = false;
StatsLogCompatManager.LOGS_CONSUMER.remove(mAppEventProducer);
if (mIsPrimaryInstance) {
if (mIsPrimaryInstance && LawnchairQuickstepCompat.ATLEAST_R) {
mStatsManager.clearPullAtomCallback(SysUiStatsLog.LAUNCHER_LAYOUT_SNAPSHOT);
}
destroyPredictors();