mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
remove unnecessary Android version checks (#23277)
Summary: React Native's minSdkVersion is 16, or we support Android versions 16 (Jelly Bean) and above. But in the code we have many checks if Android is Jelly Bean or newer, which are unnecessary. This PR removes unnecessary Android version checks, also uses Android version names instead of numbers. [Android] [Changes] - remove unnecessary Android version checks Pull Request resolved: https://github.com/facebook/react-native/pull/23277 Differential Revision: D13955909 Pulled By: cpojer fbshipit-source-id: 6b1caa5ef4fe42273d3c69a6617fff140a697b5c
This commit is contained in:
committed by
Facebook Github Bot
parent
9a7fff9eb1
commit
4d95e85f64
+1
-5
@@ -114,11 +114,7 @@ public class ReactNativeTestRule implements TestRule {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
if (isLayoutUpdated.get()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
mView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
} else {
|
||||
mView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
}
|
||||
mView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
mLatch.countDown();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user