Version code cleanup

> Renaming Lmp to Lollipop
  > Lollipop_MR1 instead of directly using 22
  > Using M APIs directly instead of reflection

Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
This commit is contained in:
Sunny Goyal committed 2015-08-17 13:26:01 -07:00
1 parent b62a976346
commit 9fc953b94d
29 files changed
+87 -114

No files matched your search

@@ -34,7 +34,7 @@ public class UserHandleCompat {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public static UserHandleCompat myUserHandle() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (Utilities.ATLEAST_JB_MR1) {
return new UserHandleCompat(android.os.Process.myUserHandle());
} else {
return new UserHandleCompat();
@@ -55,7 +55,7 @@ public class UserHandleCompat {
@Override
public String toString() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (Utilities.ATLEAST_JB_MR1) {
return mUser.toString();
} else {
return "";
@@ -67,7 +67,7 @@ public class UserHandleCompat {
if (!(other instanceof UserHandleCompat)) {
return false;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (Utilities.ATLEAST_JB_MR1) {
return mUser.equals(((UserHandleCompat) other).mUser);
} else {
return true;
@@ -76,7 +76,7 @@ public class UserHandleCompat {
@Override
public int hashCode() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (Utilities.ATLEAST_JB_MR1) {
return mUser.hashCode();
} else {
return 0;
@@ -89,7 +89,7 @@ public class UserHandleCompat {
* profiles so this is a no-op.
*/
public void addToIntent(Intent intent, String name) {
if (Utilities.isLmpOrAbove() && mUser != null) {
if (Utilities.ATLEAST_LOLLIPOP && mUser != null) {
intent.putExtra(name, mUser);
}
}