Revert "Add Build.isAtLeastO"
This reverts commit 3b8b07c8f4.
Bug: 32668621
Test: this is a revert, no original tests
Change-Id: I893025f32423aed3fe15a64c22753d24aafc4e65
This commit is contained in:
@@ -349,7 +349,9 @@ final class BackStackRecord extends FragmentTransaction implements
|
||||
|
||||
public BackStackRecord(FragmentManagerImpl manager) {
|
||||
mManager = manager;
|
||||
mAllowOptimization = Build.isAtLeastO();
|
||||
int targetSdkVersion = manager.mHost.getContext().getApplicationInfo().targetSdkVersion;
|
||||
// TODO: make the check N_MR1 or O
|
||||
mAllowOptimization = targetSdkVersion > Build.VERSION_CODES.N;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
|
||||
@@ -924,16 +924,4 @@ public class Build {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the device is running on the Android O release or newer.
|
||||
*
|
||||
* @return {@code true} if O APIs are available for use
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static boolean isAtLeastO() {
|
||||
return !"REL".equals(VERSION.CODENAME)
|
||||
&& "O".compareTo(VERSION.CODENAME) <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user