mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 09:38:19 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user