commit | f8edf07fef2bfbf1c96e8d44a58d79be4c3e4d1d | [log] [tgz] |
---|---|---|
author | Hyunyoung Song <hyunyoungs@google.com> | Mon May 13 16:07:22 2019 -0700 |
committer | Hyunyoung Song <hyunyoungs@google.com> | Mon May 13 16:07:22 2019 -0700 |
tree | f4e0849f09f7fcf106a8c351f3cf5bfbc8c754b9 | |
parent | 1ebb52cc9748f7e4fd8b3780e855d2f1a86f0846 [diff] |
isAtLeastQ should use CODENAME until SdkInt is ready Bug: 132340681 Change-Id: I06a43865d12d875b56c6a8a0d349e0db9474cb4d
diff --git a/src/com/android/wallpaper/compat/BuildCompat.java b/src/com/android/wallpaper/compat/BuildCompat.java index 67ae485..80bc906 100755 --- a/src/com/android/wallpaper/compat/BuildCompat.java +++ b/src/com/android/wallpaper/compat/BuildCompat.java
@@ -96,6 +96,8 @@ } public static boolean isAtLeastQ() { - return sSdk > VERSION_CODES.P; + return Build.VERSION.CODENAME.length() == 1 + && Build.VERSION.CODENAME.charAt(0) >= 'Q' + && Build.VERSION.CODENAME.charAt(0) <= 'Z'; } }