am 424fb606: Change MNC codename to just M.
* commit '424fb60606196329311b7400b587fafd506cf907':
Change MNC codename to just M.
diff --git a/samples/browseable/RuntimePermissions/src/com.example.android.system.runtimepermissions/PermissionUtil.java b/samples/browseable/RuntimePermissions/src/com.example.android.system.runtimepermissions/PermissionUtil.java
index ba2370f..d0742ea 100644
--- a/samples/browseable/RuntimePermissions/src/com.example.android.system.runtimepermissions/PermissionUtil.java
+++ b/samples/browseable/RuntimePermissions/src/com.example.android.system.runtimepermissions/PermissionUtil.java
@@ -79,12 +79,6 @@
}
public static boolean isMNC() {
- /*
- TODO: In the Android M Preview release, checking if the platform is M is done through
- the codename, not the version code. Once the API has been finalised, the following check
- should be used: */
- // return Build.VERSION.SDK_INT == Build.VERSION_CODES.MNC
-
- return "MNC".equals(Build.VERSION.CODENAME);
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
}
}
diff --git a/samples/browseable/RuntimePermissionsBasic/src/com.example.android.basicpermissions/MainActivity.java b/samples/browseable/RuntimePermissionsBasic/src/com.example.android.basicpermissions/MainActivity.java
index 9de3b01..36941eb 100644
--- a/samples/browseable/RuntimePermissionsBasic/src/com.example.android.basicpermissions/MainActivity.java
+++ b/samples/browseable/RuntimePermissionsBasic/src/com.example.android.basicpermissions/MainActivity.java
@@ -124,12 +124,6 @@
}
public static boolean isMNC() {
- /*
- TODO: In the Android M Preview release, checking if the platform is M is done through
- the codename, not the version code. Once the API has been finalised, the following check
- should be used: */
- // return Build.VERSION.SDK_INT >= Build.VERSION_CODES.MNC
-
- return "MNC".equals(Build.VERSION.CODENAME);
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
}
}