diff --git a/CompatLib/build.gradle b/CompatLib/build.gradle index 24cd490fde..92e0a5b81b 100644 --- a/CompatLib/build.gradle +++ b/CompatLib/build.gradle @@ -7,7 +7,7 @@ android { compileSdk 31 defaultConfig { - minSdk 28 + minSdk 26 targetSdk 31 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/CompatLibVR/build.gradle b/CompatLibVR/build.gradle index 1d6b399f9c..5ce8ca3b15 100644 --- a/CompatLibVR/build.gradle +++ b/CompatLibVR/build.gradle @@ -7,7 +7,7 @@ android { compileSdk 30 defaultConfig { - minSdk 28 + minSdk 26 targetSdk 31 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/CompatLibVS/build.gradle b/CompatLibVS/build.gradle index b8d66d380b..6eb8e4bbc8 100644 --- a/CompatLibVS/build.gradle +++ b/CompatLibVS/build.gradle @@ -7,7 +7,7 @@ android { compileSdk 31 defaultConfig { - minSdk 28 + minSdk 26 targetSdk 31 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/SystemUIShared/build.gradle b/SystemUIShared/build.gradle index 871874663f..2257386fac 100644 --- a/SystemUIShared/build.gradle +++ b/SystemUIShared/build.gradle @@ -6,7 +6,7 @@ android { buildToolsVersion BUILD_TOOLS_VERSION defaultConfig { - minSdkVersion 28 + minSdkVersion 26 targetSdkVersion 28 versionCode 1 versionName "1.0" diff --git a/SystemUIShared/src/com/android/systemui/shared/system/ThreadedRendererCompat.java b/SystemUIShared/src/com/android/systemui/shared/system/ThreadedRendererCompat.java index ffd8a08905..fc6563f776 100644 --- a/SystemUIShared/src/com/android/systemui/shared/system/ThreadedRendererCompat.java +++ b/SystemUIShared/src/com/android/systemui/shared/system/ThreadedRendererCompat.java @@ -29,6 +29,10 @@ public class ThreadedRendererCompat { public static int EGL_CONTEXT_PRIORITY_LOW_IMG = 0x3103; public static void setContextPriority(int priority) { - ThreadedRenderer.setContextPriority(priority); + try { + ThreadedRenderer.setContextPriority(priority); + } catch (Throwable e) { + // ignore + } } } diff --git a/build.gradle b/build.gradle index 6946a7f357..e5c4e53aed 100644 --- a/build.gradle +++ b/build.gradle @@ -165,7 +165,7 @@ android { withQuickstep { dimension "recents" - minSdkVersion 28 + minSdkVersion 26 } withoutQuickstep { diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 1395fe5c44..36f59b79ec 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -116,7 +116,7 @@ public final class Utilities { private static final Matrix sInverseMatrix = new Matrix(); public static final String[] EMPTY_STRING_ARRAY = new String[0]; - public static final Person[] EMPTY_PERSON_ARRAY = new Person[0]; + public static final Person[] EMPTY_PERSON_ARRAY = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) ? new Person[0] : null; public static final boolean ATLEAST_O = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O; diff --git a/src/com/android/launcher3/model/data/WorkspaceItemInfo.java b/src/com/android/launcher3/model/data/WorkspaceItemInfo.java index 690e904a02..044c9f05ef 100644 --- a/src/com/android/launcher3/model/data/WorkspaceItemInfo.java +++ b/src/com/android/launcher3/model/data/WorkspaceItemInfo.java @@ -173,9 +173,11 @@ public class WorkspaceItemInfo extends ItemInfoWithIcon { } disabledMessage = shortcutInfo.getDisabledMessage(); - Person[] persons = ApiWrapper.getPersons(shortcutInfo); - personKeys = persons.length == 0 ? Utilities.EMPTY_STRING_ARRAY - : Arrays.stream(persons).map(Person::getKey).sorted().toArray(String[]::new); + if (Utilities.ATLEAST_Q) { + Person[] persons = ApiWrapper.getPersons(shortcutInfo); + personKeys = persons.length == 0 ? Utilities.EMPTY_STRING_ARRAY + : Arrays.stream(persons).map(Person::getKey).sorted().toArray(String[]::new); + } } /** Returns the WorkspaceItemInfo id associated with the deep shortcut. */