From 752c3757b1ad9d25ceb3d2c1b6510d6cc9cee331 Mon Sep 17 00:00:00 2001 From: Pun Butrach Date: Sat, 27 Apr 2024 20:14:34 +0700 Subject: [PATCH] Don't elevate priority for devices below Q (#4331) * Don't elevate priority for devices below Q EGL_CONTEXT_PRIORITY_HIGH_IMG doesn't exist for Android below Q and Lawnchair Launcher don't support QuickSwitch for Android Q anyway, the effect should have no effect on daily usage. Signed-off-by: Pun Butrach * Update quickstep/src/com/android/quickstep/QuickstepProcessInitializer.java * Use AtLeast check from Launcher3's Utilities Signed-off-by: Pun Butrach * Update quickstep/src/com/android/quickstep/QuickstepProcessInitializer.java Co-authored-by: Zongle Wang --------- Signed-off-by: Pun Butrach Co-authored-by: Zongle Wang --- .../src/com/android/quickstep/QuickstepProcessInitializer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quickstep/src/com/android/quickstep/QuickstepProcessInitializer.java b/quickstep/src/com/android/quickstep/QuickstepProcessInitializer.java index 1ccf5068de..426d92a568 100644 --- a/quickstep/src/com/android/quickstep/QuickstepProcessInitializer.java +++ b/quickstep/src/com/android/quickstep/QuickstepProcessInitializer.java @@ -27,6 +27,7 @@ import android.view.ThreadedRenderer; import com.android.launcher3.BuildConfig; import com.android.launcher3.MainProcessInitializer; +import com.android.launcher3.Utilities; import com.android.systemui.shared.system.InteractionJankMonitorWrapper; @SuppressWarnings("unused") @@ -64,6 +65,7 @@ public class QuickstepProcessInitializer extends MainProcessInitializer { // Elevate GPU priority for Quickstep and Remote animations. try { + if (!Utilities.ATLEAST_Q) return; ThreadedRenderer.setContextPriority( ThreadedRenderer.EGL_CONTEXT_PRIORITY_HIGH_IMG); } catch (Exception e) {