diff options
author | Régis Décamps <regisd@google.com> | 2016-03-17 20:51:47 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-03-17 20:51:47 +0000 |
commit | 31a240c0c05c9959f7a506c2fb9f43d1b95c59f1 (patch) | |
tree | c6e6bb0ec40c6176e12845d920fb693e710cd10d /src/com | |
parent | fe213c0a7471efcad1afcdb8fd6e261f621d6d40 (diff) | |
parent | 2fdb93a46f48aff76fbfbfa22ac895cdf1080c79 (diff) | |
download | chips-31a240c0c05c9959f7a506c2fb9f43d1b95c59f1.tar.gz |
Reference BUILD_CODES.M instead of 23.
am: 2fdb93a
* commit '2fdb93a46f48aff76fbfbfa22ac895cdf1080c79':
Reference BUILD_CODES.M instead of 23.
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/ex/chips/ChipsUtil.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/ex/chips/ChipsUtil.java b/src/com/android/ex/chips/ChipsUtil.java index 3509f0e..9c299fa 100644 --- a/src/com/android/ex/chips/ChipsUtil.java +++ b/src/com/android/ex/chips/ChipsUtil.java @@ -51,9 +51,8 @@ public class ChipsUtil { * <p>This is interesting for us because new permission model is introduced in M and we need to * check if we have {@link #REQUIRED_PERMISSIONS}. */ - public static boolean isRunningMncOrLater() { - // TODO: Update to use M once it's finalized in VERSION_CODES - return Build.VERSION.SDK_INT > 22; + public static boolean isRunningMOrLater() { + return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; } /** @@ -61,7 +60,7 @@ public class ChipsUtil { * {@link PackageManager#PERMISSION_DENIED} if not. */ public static int checkPermission(Context context, String permission) { - if (isRunningMncOrLater()) { + if (isRunningMOrLater()) { // TODO: Use "context.checkSelfPermission(permission)" once it's safe to move to M sdk return context.checkPermission(permission, Process.myPid(), Process.myUid()); } else { |