Replaced Utilities.isNycOrAbove() with version code check.
- Instead of using reflection to check if N is present, we now use Build.VERSION.SDK_INT >= Build.VERSION_CODES.N. - Other places that used reflection to use N APIs have also been cleaned up. Bug: 22942492 Change-Id: Ia7b981cae375e800bcc8f0c54aec48e0c8c076da
This commit is contained in:
@@ -62,7 +62,7 @@ public class PackageManagerHelper {
|
||||
// The value of FLAG_SUSPENDED was reused by a hidden constant
|
||||
// ApplicationInfo.FLAG_PRIVILEGED prior to N, so only check for suspended flag on N
|
||||
// or later.
|
||||
if (Utilities.isNycOrAbove()) {
|
||||
if (Utilities.ATLEAST_N) {
|
||||
return (info.flags & FLAG_SUSPENDED) != 0;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user