From 7e31e9b2676fa7049125453469d867bf3887c7ef Mon Sep 17 00:00:00 2001 From: Steven Ng Date: Wed, 16 Jun 2021 23:56:38 +0100 Subject: [PATCH] Modify AT_LEAST_S check to include SDK int BuildCompat.isAtLeastS() in Launcher dependency only checks if the code name is "S". In the recent version of Android, the code name has changed to "REL". Test: Open Widgets picker, expand Conversations and observe a preview layout is shown. Fix: 191239040, 191216821 Change-Id: I6a6e647d4cb327d251bde3484ea2d2e79c0f86f5 --- src/com/android/launcher3/Utilities.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index a2d86bc7fa..75f6278a47 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -122,7 +122,8 @@ public final class Utilities { public static final boolean ATLEAST_R = Build.VERSION.SDK_INT >= Build.VERSION_CODES.R; - public static final boolean ATLEAST_S = BuildCompat.isAtLeastS(); + public static final boolean ATLEAST_S = BuildCompat.isAtLeastS() + || Build.VERSION.SDK_INT >= Build.VERSION_CODES.S; /** * Set on a motion event dispatched from the nav bar. See {@link MotionEvent#setEdgeFlags(int)}.